The ____ keyword is used to create a new variable and assign it a specific data type.
- define
- int
- type
- var
In Python, the type keyword is used to create a new variable and assign it a specific data type. For example, x = type(5) would assign the integer type to the variable x.
Loading...
Related Quiz
- The lifetime of a variable is determined by its _______ in the code.
- How can you achieve multiple inheritance in Python?
- Which feature of Python allows us to handle different numbers and types of arguments?
- What's the difference between global and nonlocal keywords when referring to variables in a function?
- To make the custom objects of a class iterable using a for loop, one should implement the _______ and _______ methods.