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
Industrial Starch Market Overview: Trends, Challenges, and Future Outlook
The global industrial starch market has witnessed significant growth over the past decade, and...
Anti-Fog, UV Protection, and Durability: Key Product Features Driving Demand
The global sports goggles market has witnessed significant evolution over the past decade, driven...
ビジュアルノベルの世界市場レポート:主要企業分析、競争環境、成長戦略2025
ビジュアルノベル世界総市場規模...
Step-by-Step Guide to Roofing Installation: What to Expect
A properly installed roof not only enhances your home’s structural integrity but also adds...