>>>if(3):
print('foo')
Answers
Answered by
0
Explanation:
>>> l = [1,2,3]
>>> x = 1
>>> x in l and lambda: print("Foo")
x in l && print "Horray"
^
SyntaxError: invalid syntax
A bit of googling revealed that print is a statement in python2 whereas it's a function in python3. But, I have tried the above snipped in python3 and it throws SyntaxError exception.
Similar questions
Math,
4 months ago
Computer Science,
4 months ago
Math,
8 months ago
Math,
8 months ago
Math,
1 year ago