Skip to content

Latest commit

 

History

History
executable file
·
51 lines (34 loc) · 613 Bytes

File metadata and controls

executable file
·
51 lines (34 loc) · 613 Bytes

Types

Examples in Python 3

"""
Print out the type of some values
"""
# Numbers
print(type(42))
print(type(4.2))

# String
print(type("Hello world!"))

# Booleans
print(type(True))
print(type(False))

# None
print(type(None))

# Multiline
hello = """
Hello
World!
"""
print(type(hello))

# Function
def test():
	print("test-function")
print(type(test))

Reference and read more

type()

Revision history

2014-07-16 (sylvanas) PA1 First try.