3 questions · 3 answered
Python questions
Questions asked by learners preparing for interviews and placements, answered by other members. Ask your own and it appears here too.
- 2answers 10votes a is b True for 256 but False for 257?? >>> a = 256 >>> b = 256 >>> a is b True >>> a = 257 >>> b = 257 >>> a is b False what PythonFatima Siddiqui·1 month ago
- 1answer 5votes nested list comprehension order confuses me [x for row in matrix for x in row] which for runs first? I always get this wrong PythonDeepak Nair·1 month ago
- 2answers 11votes python default argument list keeps old values?? def add(x, lst=[]): lst.append(x) return lst print(add(1)) print(add(2)) I thought it prints [1] and [2]. it prints [1] and [1, 2]. why is the list shared betw… Pythonaman khan·2 months ago
Learn Python properly
Structured lessons on DSA, core CS, Java and interview skills, each ending in a quiz so you know it stuck.