Skip to content

Intermediate level python quiz

What will be the output of the following code: print([1, 2, 3] * 2)?

What is the purpose of the `__init__()` method in Python?

How do you remove an item from a list by its index in Python?

What will be the output of the following code: print([1, 2, 3] == [1, 2, 3])?

Which of the following can be used to define a default argument value for a function in Python?

What does the `filter()` function do in Python?

What is the output of the following code: print(5 // 2)?

Which of the following methods is used to join the elements of a list into a string in Python?

How do you create a generator in Python?

What is the purpose of the `@property` decorator in Python?


J2J Institute private limited