This snippet worked great
if True: print "just True"
if (True): print "(True)"
Studied the loops and they worked great
for i in range(1, 3):
print i
i = 0
while i < 3: # without paranthesis
print i
i = i + 1
i = 0
while (i < 3): # with paranthesis
print i
i = i + 1
When i tried
for (i in range(1, 3)):
print i
I get the error "SyntaxError: invalid syntax"
I understand that the outer bracket makes the loop crazy (error), but what part of the syntax is it breaking ? it worked perfectly during the cycle
source
share