Python data types
Python Data types
![]() |
| Image credits: Geeks for Geeks |
In this tutorial we will learn about different data types in python with example
Python numeric data type
1. int
2. float
3. complex
int data type
It is used store integers
type(element) gives the data type of the element
Example:
![]() |
| Image credits: Programiz |
Output:
![]() |
| Image credits: Programiz |
Float data type
It is used to store numbers which have decimal points
Example:
![]() |
| Image credits: Programiz |
Output:
![]() |
| Image credits: Programiz |
Complex data type
It is used to store complex numbers
Example
![]() |
| Image credits: Programiz |
Output
![]() |
Image credits: Programiz
String data type
It is used to store a collection of characters
Example:
![]() |
| Image credits: Programiz |
Output
![]() |
| Image credits: Programiz |
Remaining data types like list,set, dictionary etc... are a little advanced topics which we will see in further tutorial
Disclaimer: All the above images used in this blog are owned by respective owners. Please contact me for any removal of images. No copyright infringement
.jpeg)








Comments
Post a Comment