Built-in Types in Python Posted on 2018-11-28 | Visitors: 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667# typeprint(" 0.type example")print(type(type(int('227'))))print(type(type('227')))print(type(type('227')) == type)print(type(type('227')) == "type")# three distinct numeric types: integers, floating point numbers, and complex numbers.# Booleansprint(" 1.0 bool example")print(type(True))print(type(False))print(type(True) == bool)print(type(True) == int)# intprint(" 1.1 int example")print(type(120))print(type(120) == int)# floatprint(" 1.2 float example")print(type(2.5))print(type(2.5) == float)# complexprint(" 1.3 complex example")print(complex)print(complex())print(complex(3 + 4j))print(type(complex(2 + 6j)))print(type(complex(1 + 2j)) == complex)# strprint(" 2.str example")print(type(""))print(type(''))print(type(''''''))print(type(""""""))print(type('''test'''))print(type("""test"""))print(type("") == str)# listprint(" 3.list example")print(type([]))print(type([]) == list)# tupleprint(" 4.tuple example")print(type(()))print(type(()) == tuple)# setprint(" 5.set example")print(type({}))print(type({1, 4, 2}))print(type({1, 4, 2}) == set)# dictprint(" 6.dict example")print(type({}))print(type({1: 2}))print(type({1: 2}) == dict)print(set == dict)# frozensetprint(" 7.frozenset example")print(frozenset([1, 4, 3, 5, 2]))print(type(frozenset([1, 4, 3, 5, 2])) == frozenset)