@notrated/

type-1

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
def fun(val):
  if type(val) is int:
    print("It is an int!")
  elif type(val) is str:
    print("It is a string!")
  else:
    print("Unknown type :(")

fun(1)
fun("Hello World")
fun(1.0)