0% found this document useful (0 votes)
4 views

Python Data Types Fun

These are my research about python datatypes for beginners. To learn at its best, I am encourage to give some free stuff to self learners.

Uploaded by

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

Python Data Types Fun

These are my research about python datatypes for beginners. To learn at its best, I am encourage to give some free stuff to self learners.

Uploaded by

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

Python Data Types

1. Numeric Types

- int: Integer values, e.g., 5, -3

- float: Floating-point values, e.g., 3.14, -0.001

- complex: Complex numbers, e.g., 1 + 2j

2. Sequence Types

- str: String, a sequence of characters, e.g., "hello", "123"

- list: List, an ordered collection of items, e.g., [1, 2, 3], ["apple", "banana"]

- tuple: Tuple, an ordered and immutable collection of items, e.g., (1, 2, 3), ("a", "b")

- range: Range, represents a sequence of numbers, e.g., range(0, 10)

3. Mapping Type

- dict: Dictionary, a collection of key-value pairs, e.g., {"name": "Alice", "age": 30}

4. Set Types
Python Data Types

- set: Set, an unordered collection of unique items, e.g., {1, 2, 3}, {"a", "b"}

- frozenset: Frozenset, an immutable version of set, e.g., frozenset({1, 2, 3})

5. Boolean Type

- bool: Boolean values, True or False

6. Binary Types

- bytes: Immutable sequence of bytes, e.g., b'hello'

- bytearray: Mutable sequence of bytes, e.g., bytearray(b'hello')

- memoryview: Memory view object, e.g., memoryview(b'hello')

7. None Type

- NoneType: Represents the absence of a value, e.g., None

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy