Python Datatypes

Welcome to Python tutorials for beginners. In this tutorial you are going to learn a lot about Python datatypes. Here is the list of all the supported Python datatype which are typically used in order to create an application or a website.

Python for beginners complete course

Python String Datatype

Python string datatype is most commonly used datatype. There is hardly any Application developed in Python Program without using String datatype. Whenever you take input from user using Python Input() Method, the receive data is by default of String datatype.

xyz = “Welcome to Python!!!”

Python Integer Datatype

xyz = 20

Python Float Datatype

xyz = 20.5

Python Complex Datatype

xyz = 1j

Python List Datatype

Without a doubt my most favorite datatype in python is Python lists. Lists are not only so easy to maintain data but also easy to iterate through. In addition to that lists come quite handy when you are dealing with REST APIs. Rest APIs provide you data in the form of JSON which is quite similar to python lists and dictionary datatype. Here is how a typical list datatype will look like.

xyz = [“Red”, “Green”, “Blue”]print(type(xyz))

Python Tuple Datatype

xyz = (“Red”, “Green”, “Blue”)

Python Range Datatype

xyz = range(6)

Python Dict Datatype

xyz = {“name” : “Smith”, “age” : 30}

Python Set Datatype

xyz = {“Red”, “Green”, “Blue”}

Python Frozenset

xyz = frozenset({“apple”, “banana”, “cherry”})

Python Boolean Datatype

xyz = True

Python Bytes Datatype

xyz = b”Hello”

Python Byte Array Datatype

xyz = bytearray(5)

Python Memory View Datatype

xyz = memoryview(bytes(5))

xyz = str(10)

xyz = xyz + str(1)

Excited to learn more from Python Tutorials for Beginners?

If you are liking Python Programming for beginners tutorials then continue reading more here. Alternatively, do consider subscribing to my Youtube channel to continue learning more on Python programming and automation you can do using python programming.

Excited to learn Python tutorials for beginners?

Leave a Comment

Subscribe to our newsletter for weekly tips.

Thanks for Subscribing to Newsletter.

There was an error while trying to send your request. Please try again.

IT Panther will use the information you provide on this form to be in touch with you and to provide updates and marketing.
%d bloggers like this: