r/Python • u/AkashDaniel • Mar 03 '16
Top 30 Mind Bending Python Interview Questions
https://intellipaat.com/interview-question/python-interview-questions/
0
Upvotes
2
u/notspartanono Mar 03 '16
So wrong:
def cmp(intellipaatlist1, intellipaatlist2):
for val in intellipaatlist1:
if val in intellipaatlist2:
return True
return FalseWTF.
2
u/heptara Mar 04 '16
The answers to many of these are wrong. This site is just spam, or possibly harmful to learners.
1
Mar 03 '16 edited Mar 03 '16
Here's a mind bender...
def foo():
a = []
a.extend([a] for _ in range(10))
del aWhy does this fail with a syntax error in Python 2?
Edit: bracketed too much.
2
1
5
u/Poffey21 Mar 03 '16
Advertisement for training services. No question was mind bending.