Python Interview questions - decorators
(Python version 3.9 or later version)
Which of the following Python objects is immutable?
set
dict
list
str
What would be the result of executing the following code?
print(True*2)
TrueTrue
True True
2
Syntax Error
Python Interview Questions
  • Python - Decorators
    1. Decorator used to define a static method?
    A) @staticmethod
    B) @static
    C) @static.method

    Answer: @staticmethod
  • gk