pythonHow to get type of object
Usage example
obj = 'hi'
print(type(obj))
output
<class 'str'>
More of Python
- How to get minutes from datetime
- Check if a given string is a palindrome
- How to add an element to the list
- How to check if object is of certain type
- One-liner if else
- Join list elements into string
- How to swap two variables values
- One-liner calculator
- How to get hour from datetime
- How to get yesterday's date
See more codes...