"पाइथन" के अवतरणों में अंतर

2,202 बैट्स् जोड़े गए ,  2 वर्ष पहले
def for lambda try
</syntaxhighlight>
 
; {|class="wikitable"
|+ पाइथन ३ के अन्तःनिर्मित (built-in) टाइप
|-
! Type
! mutable
! वर्णन
! सिन्टैक्स का उदाहरणा
|-
| <code>bool</code>
| immutable
| [[Boolean value]]
| <code>True</code><br><code>False</code>
|-
| <code>bytearray</code>
| mutable
| Sequence of [[byte]]s
| <code>bytearray(b'Some ASCII')</code><br><code>bytearray(b"Some ASCII")</code><br><code>bytearray([119, 105, 107, 105])</code>
|-
| <code>bytes</code>
| immutable
| Sequence of bytes
| <code>b'Some ASCII'</code><br><code>b"Some ASCII"</code><br><code>bytes([119, 105, 107, 105])</code>
|-
| <code>complex</code>
| immutable
| [[Complex number]] with real and imaginary parts
| <code>3+2.7j</code>
|-
| <code>dict</code>
| mutable
| [[Associative array]] (or dictionary) of key and value pairs; can contain mixed types (keys and values), keys must be a hashable type
| <code>{'key1': 1.0, 3: False}</code>
|-
| <code>ellipsis</code>
|
| An [[Ellipsis (programming operator)|ellipsis]] placeholder to be used as an index in [[NumPy]] arrays
| <code>...</code>
|-
| <code>float</code>
| immutable
| [[Floating point]] number, system-defined precision
| <code>3.1415927</code>
|-
| <code>frozenset</code>
| immutable
| Unordered [[set (computer science)|set]], contains no duplicates; can contain mixed types, if hashable
| <code>frozenset([4.0, 'string', True])</code>
|-
| <code>int</code>
| immutable
| [[integer (computer science)|Integer]] of unlimited magnitude<ref name="pep0237" />
| <code>42</code>
|-
| <code>list</code>
| mutable
| [[list (computer science)|List]], can contain mixed types
| <code>[4.0, 'string', True]</code>
|-
| <code>set</code>
| mutable
| Unordered [[set (computer science)|set]], contains no duplicates; can contain mixed types, if hashable
| <code>{4.0, 'string', True}</code>
|-
| <code>str</code>
| [[immutable object|immutable]]
| A [[character string]]: sequence of Unicode codepoints
| <code>'Wikipedia'</code><br><code>"Wikipedia"</code><br><code>"""Spanning<br>multiple<br>lines"""</code>
|-
| <code>tuple</code>
| immutable
| Can contain mixed types
| <code>(4.0, 'string', True)</code>
|}