Data types used in Python
Posted 2022-10-10 11:10:35
0
37
Below are the examples, how you can set different kind of Data types in Python.
Example | Data Type |
---|---|
x = "Hello World" | str |
x = 20 | int |
x = 20.5 | float |
x = 1j | complex |
x = ["apple", "banana", "cherry"] | list |
x = ("apple", "banana", "cherry") | tuple |
x = range(6) | range |
x = {"name" : "John", "age" : 36} | dict |
x = {"apple", "banana", "cherry"} | set |
x = frozenset({"apple", "banana", "cherry"}) | frozenset |
x = True | bool |
x = b"Hello" | bytes |
x = bytearray(5) | bytearray |
x = memoryview(bytes(5)) | memoryview |
x = None | NoneType |
Search
Categories
- Information Technology
- Office Equipment and Supplies
- Cars and Trucks
- Persons
- Books and Authors
- Tutorials
- Art
- Causes
- Crafts
- Dance
- Drinks
- Film
- Fitness
- Food
- Games
- Gardening
- Health
- Home
- Literature
- Music
- Networking
- Other
- Party
- Religion
- Shopping
- Sports
- Theater
- Wellness
Read More
Innovation in Animal Health: Wound Care Products Market Outlook
"Executive Summary Animal Wound Care Market :
CAGR Value
Data Bridge Market Research...
Centre High Mount Stop Lamps Market: Sector Insights: Market Distribution, Scale, Developments, Forecast, and Industry Snapshot
Executive Summary Centre High Mount Stop Lamps Market :
The centre high mount stop...
Biaxially Oriented Polyethylene Terephthalate (BOPET) Films Market Analysis by Size & Research Report (2024–2032) | UnivDatos
According to the UnivDatos analysis, growing demand from the food & beverages,...
Co-Robots Robotics Market Trends, Insights and Future Outlook
"Executive Summary Co-Robots Robotics Market :
Data Bridge Market Research...
Speed Up Your Site: Best Hosting for WordPress Performance
If you're launching a small business or startup, your website is more than just a digital...