Q1.What is the purpose of 'elif'?
Q2.What is the output of range(5, 0, -1)?
Q3.Can we use 'is' for value comparison?
Q4.When does the 'else' block of a loop run?
Q5.What is a 'sentinel value'?
Q6.Output: for x in [1, 2]: x? (if x is printed)
Q8.How to exit all nested loops?
Q9.What is the result of 'if None:'?
Q10.What is a list comprehension?
Q11.Output: [x*2 for x in range(3)]?
Q12.Can list comprehension have if-else?
Q13.What is the walrus operator (:=)?
Q14.Valid walrus: if (n := len(L)) > 0:?
Q16.Output of for i, v in enumerate(['a']): print(i, v)?
Q17.What is zip() used for?
Q18.What happens if zipped lists have different lengths?
Q19.What is the zip_longest function?
Q20.What is the __bool__ method?
Q21.What are 'short-circuit' operators?
Q24.Which loop is 'entry-controlled'?
Q25.Does Python have a do-while loop?
Q26.Output: x = 1; x = x++ (in concept)?
Q27.Purpose of the 'pass' statement?
Q28.Is 'if True: pass' valid?
Q29.What is a 'dead code' block?
Q30.What is an 'infinite loop'?