Python Quiz

241. What will be the output of:

print('hello'.capitalize())
242. Which of the following is not a valid way to declare a dictionary?
243. What is the output of:

print([i for i in range(5) if i % 2 == 0])
244. Which of these statements is true about Python functions?
245. What does the `id()` function do?
246. What is the result of:

bool([]) and bool('False')
247. Which of the following can be keys in a dictionary?
248. What does `re.match()` return if the pattern is not found?
249. How many times will this loop run?

for i in range(1, 10, 3):
    print(i)
250. What is the output of:

print({i: i*i for i in range(3)})

Explore Programming Topics