Hello friends how are you, today in this blog i will teach you what is Data types and keywords, types of data type , how data type and keyword work and programs using data type and keyword in a very simple way.
Let's start
Data Types in Python
- It is a type of data which is used in the program.
- There is no need of data type to declare a variable in Python.
- type() is predefined function of Python which is used to get data type of any data.
name="Rocky"
rollno=205
marks=85.6
print("Name Type:",type(name))
print("Rollno Type:",type(rollno))
print("Marks Type:",type(marks))
"""
***Output***
Name Type: < class str="">
Rollno Type: < class int="">
Marks Type: < class float="">
"""
Types of Data Type
- Python contains following data types:
- Numbers
- String
- List
- Tuple
- Dictionary
We will discuss these data types in next post one by one because each data type is a complete topic in itself.
Keywords in Python
- The word which is pre-defined in the library is called keyword.
- It's functionality is also pre-defined.
- Keyword can not be used as a variable,function name ,class name or as an any identifier.
- Example of keywords are if,else,for,def etc.
List of keywords in Python
asset def class continue break global for if from import nonlocal in not is lambda True False None and as else finally elif del except raise try or return pass |
Request:-If you found this post helpful then let me know by your comment and share it with your friend.
If you want to ask a question or want to suggest then type your question or suggestion in comment box so that we could do something new for you all.
If you have not subscribed my website then please subscribe my website.
Try to learn something new and teach something new to other.
Thanks.
0 Comments