0% found this document useful (0 votes)
20 views3 pages

Python Dasturlash Tilida Quyidagi Ma

Uploaded by

st08112006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views3 pages

Python Dasturlash Tilida Quyidagi Ma

Uploaded by

st08112006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Python dasturlash tilida quyidagi

ma'lumot turlari mavjud.

Matn turi: str

Raqam turlari: int, float, complex

Tarkib turlari: list, tuple, range

Xarita turi: dict

Turlarini o'rnatish: set, frozenset

Boolean turi: bool

Ikkilik turlari: bytes, bytearray, memoryview

Python dasturlash tilida ma'lumot turlari


Python dasturlash tilida type()Funktsiya yordamida istalgan ob'ekt ma'lumotlarini
olishingiz mumkin. misol uchun: print(type(attribute))

Python

1
n = 13
2
print(type(n))

<class 'int'>

Maxsus ma'lumot turini o'rnatish


Agar ma'lumotlar turini ko'rsatmoqchi bo'lsangiz, quyidagi konstruktor funktsiyalaridan
foydalanishingiz mumkin:

x = str("MasterSherkulov") str

x = int(13) int

x = float(13.15) float

x = complex(13j) complex

x = list(("KI", "IT", "913-15")) list


x = tuple(("KI", "IT", "913-15")) tuple

x = range(13) range

x = dict(name="MasterSherkulov", age=24) dict

x = set(("KI", "IT", "913-15")) set

x = frozenset(("KI", "IT", "913-15")) frozenset

x = bool(13) bool

x = bytes(13) bytes

x = bytearray(13) bytearray

x = memoryview(bytes(13)) memoryview

Tayyorladi: Sardor Turayev

You might also like