Built-in Data Types
In programming, data type is an important concept.
Variables can store data of different types, and different types can do different things.
Python has the following data types built-in by default, in these categories:
Text Type: str
Numeric Types: int, float, complex
Sequence Types: list, tuple, range
Mapping Type: dict
Set Types: set, frozenset
Boolean Type: bool
Binary Types: bytes, bytearray, memoryview
None Type: NoneType
#python #coding #programming
Python datatypes
String
x = "Guangshu Coder"
print(type(x))
integer
x = 233
print(type(x))
Float
x = 3.1467
print(type(x))
complex
x = 2j
print(type(x))
list
x = ["apple", "Banana", "Orange"]
print(type(x))
tuple
x = ("apple", "Banana", "orange")
print(type(x))
range
x= range(54)
print(type(x))
dict
x= {"name": "Guangshu Coder", "age": 22}
print(type(x))
set
x = {"Guanghu", "coder", "programmer"}
print(type(x))
bool
x = False
print(type(x))
NoneType
x = None
print(type(x))
En esta página del sitio puede ver el video en línea Python datatypes. Python code with example. Python Complete Course Video # 5 de Duración hora minuto segunda en buena calidad , que subió el usuario Guangshu Coder 29 diciembre 2022, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 27 veces y le gustó like a los espectadores. Disfruta viendo!