==>To
learn full explanation watch video <==
Data
types in Python
Hello friends, welcome to Tech Prog…...Today Iam going
to discuss on Data Types In Python.Here we
going to learn what is Data Type,types on Data Type
and why we should use them.
Let’s start
Data Type :-
Introduction
Data type is tell the computer memory which type of
value is this because these values are in future stored in the memory.
There are various data types in Python. Some of the
important types are listed below.
Numbers
Numerical values is called Number Data Type.
A = 20
print(A)
Integers can be of any length, it is only limited by
the memory available.
Lists
List is an ordered sequence of items. Lists. Items
separated by commas and are enclosed within brackets [ ].
a = [1, 2.2345, 'Tech
Prog']
Lists are mutable, meaning, ttheir values can be
changed and updatable.
a = [1, 2, 3]
a[2] = 4
print(a)
Output
[1, 2, 4]
Tuples
Tuple is an ordered sequence of items same as a list.
The only difference is that tuples are immutable. Tuples cannot be modified.
It is defined within parentheses () where items are
separated by commas.
x = (5,'where am I',
23.45)
Strings
String is sequence of multiple characters. We can use
single quotes or double quotes for these strings.
x = "My home in new
city"
print(s)
Sets
Set is an unordered collection of unique items. Set is
defined by values separated by comma inside braces { }. Items in a set are not
dublicate.
A = {1,4,3,9,5}
Dictionaries
Dictionary is an unordered collection and have the
key-value pairs.It is generally used when we have a huge amount of data.
In Python, dictionaries are defined within braces {} .
dict =
{‘one’:'hello','two':’world’}
print(dict)
Conclusion
In this tutorial, I will explain all the concepts of
the data types and Iam really enjoying to present and show data types ……..
To learn
practical python demo project in my next video Wait and watch for my next video
------>>>
Thank you Guys and Good Bye...
0 Comments