Quick actions

cmd+k|ctrl+k

Navigation

Languages

type function 

Snippet info

Language

Python

Visibility

public

Author

smh.tabatabaee

Created

2020-01-25T10:37:18Z

Updated

2020-01-30T12:36:58Z

#learning type function with example
x = 21
print(type(x))

x2 = 21.5
print(type(x2))

x3 = True
print(type(x3))

print("\n==================\n")

print(type(x + x2))

print(type(x2 - x))

print(type(x2 * x))

print(type(x2 / x))

print(type(x2 // x))

print(type(x2 % x))


print("\n==================\n")
#another example

x4 = 18

print(type(x + x4))

print(type(x4 - x))

print(type(x4 * x))

print(type(x4 / x))

print(type(x4 // x))

print(type(x4 % x))
INFO