1#This is able to tell the user what the type of an object is
2string_example = "string"
3int_example = 1
4float_example = 1.1
5type_of_string = type(string_example)
6#<class 'str'>
7type_of_int = type(int_example)
8#<class 'int'>
9type_of_float = type(float_example)
10#<class 'float'>
1numbers_list = [1, 2]
2print(type(numbers_list))
3
4numbers_dict = {1: 'one', 2: 'two'}
5print(type(numbers_dict))
6
7class Foo:
8 a = 0
9
10foo = Foo()
11print(type(foo))
12
13 Output
14
15<class 'dict'>
16<class 'Foo'>
17<class '__main__.Foo'>