Which keyword is used to create a class in Python?
- class
- cls
- def
- object
In Python, the keyword used to create a class is class. Classes are used to define new data types and their behaviors.
Loading...
Related Quiz
- When a package is imported, Python searches for _______ to determine the package's initialization.
- You are required to implement a feature where you need to quickly check whether a user's entered username is already taken or not. Which Python data structure would you use for storing the taken usernames due to its fast membership testing?
- In NumPy, the ____ function is used to calculate the element-wise maximum of two arrays.
- You've received a JSON file with non-ASCII characters, and while reading the file using the Python json module, you're facing an encoding issue. What can be done to correctly parse the JSON?
- Using the super() function without any arguments inside a derived class method implicitly refers to the _______ class.