Datatypes in python
THESE ARE THE DATA-TYPES IN PYTHON
Copy and paste this code in your code editor and save it with the extension of( .py) and run it so you can see the output of the code that what is generated in output.
a = "Hello World" #str b = 20 #int c = 20.5 #floats d = 1j #complex e = ["apple", "banana", "cherry"] #list f = ("apple", "banana", "cherry") #tuple g = range(6) #range h = {"name" : "John", "age" : 36} #dict i = {"apple", "banana", "cherry"} #set j = frozenset({"apple", "banana", "cherry"}) #frozenset k = True #boolean l = b"Hello" #bytes m = bytearray(5) #bytearray n = memoryview(bytes(5)) #memoryview print(a) print(b) print(c) print(d) print(e) print(f) print(g) print(h) print(i) print(j) print(k) print(l) print(m) print(n) | |
This is my youtube channel for datatypes click and watch it
I hope that it will be very helpful for
You. For more about python and these type of cheatsheet
join me๐ค๐๐
Comment me. what you have like or dislike in this post.
Comments
Post a Comment