Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = 5
- print(a, "is of type", type(a))
- a = 2.0
- print(a, "is of type", type(a))
- a = 1+2j
- print(a, "is complex number?", isinstance(1+2j, complex))
- a = 1234567890123456789
- a
- b = 0.1234567890123456789
- b
- c = 1+2j
- c
- a = [5,10,15,20,25,30,35,40]
- print("a[2] =", a[2])
- print("a[0:3] =", a[0:3])
- print("a[5:] =", a[5:])
- a = [1,2,3]
- a[2] = 4
- a
- t = (5,'program', 1+3j)
- print("t[1] =", t[1])
- a = {5,2,3,1,4}
- print("a =", a)
- print(type(a))
- a = {1,2,2,3,3,3}
- a
- d = {1:'value', 'key':2}
- type(d)
- d = {1:'value', 'key':2}
- print("d[1] =", d[1]);
- float(5)
- int(10.6)
- int(-10.6)
- float('2.5')
- str(25)
- set([1,2,3])
- tuple({5,6,7})
- list('hello')
- int("45")
- str(912)
Advertisement
Add Comment
Please, Sign In to add comment