Python Quiz

221. What will be the output of this code?

x = [1, 2, 3]
print(x * 2)
222. Which of the following expressions will result in a floating-point number?
223. What is the result of:

'a' * 3 + 'b' * 2
224. What will this code output?

x = 10
if x > 5:
    print('A')
else:
    print('B')
225. Which of the following is used to iterate over dictionary keys and values?
226. What is the output of:

print(2 ** 3 ** 2)
227. Which of the following is NOT allowed in Python variable names?
228. How do you define an anonymous function in Python?
229. What does the `*args` syntax do in a function definition?
230. What is the output of:

print({1, 2, 3} & {2, 3, 4})

Explore Programming Topics