Python Quiz

471. What will this code output?

print(0.1 + 0.2 == 0.3)
472. What is the result of this expression?

{1, 2, 3} & {2, 3, 4}
473. What is the output of:

print(type((1)))
474. What does this expression return?

''.join(['a', 'b', 'c'])
475. What is the output of:

print('abc' * 0)
476. What is the difference between `isinstance(obj, cls)` and `type(obj) == cls`?
477. What will this print?

print(all([]))
478. What does `re.match()` return if no match is found?
479. What is the purpose of `__str__` in a class?
480. What is the result of:

print([i for i in range(3) if i % 2])

Explore Programming Topics