0
I have a problem with a def x() in python. the problem is "inside" it. Even if I put it right, it returns Isis, no matter.
I’ve tried everything but I can’t figure out why he doesn’t return right.
Here comes the code.
def filters(a, b, c):
for a in range(1, 1):
d = "video"
else:
d = ""
for b in range(1, 1):
e = "&lclk=short"
else:
e = ""
for c in range(1, 1):
f = "&lclk=hd"
else:
f = ""
i = ("&filters=%s%s%s" % (e, d, f))
return i
Even if I put Filters(1, 1, 1) it returns only the "elses". Why will it be? Ah detail that if I try to if inside def it speaks "syntax error" :/ ( is python 2.7 )
Gives syntax error because of identation perhaps. What is the reason for using the
else
in thefor
?– stderr
Hmm I never thought I’d take it out.
– Mateus Mercer
Without Else, he ignores whether the variable is in the range (1, 1). I was hasty, sorry.
– Mateus Mercer