type variable python code example
Example 1: print variable type python
v = 10
type(v)
# <type 'int'>
Example 2: type de variable python
a=int(5)
b=float(5.6)
c=str("Hello world!")
Example 3: specify return type python function
def greeting(name: str) -> str:
return 'Hello, {}'.format(name)