0% found this document useful (0 votes)
3 views1 page

Python Data Types Lazy Notes

This document provides basic notes on Python data types, including numbers (int, float, complex), strings, booleans, lists, tuples, sets, dictionaries, and the None type. Each data type is briefly described with examples to illustrate their usage. The notes aim to help beginners understand the fundamental concepts without going into depth.

Uploaded by

Olivia Gomez
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)
3 views1 page

Python Data Types Lazy Notes

This document provides basic notes on Python data types, including numbers (int, float, complex), strings, booleans, lists, tuples, sets, dictionaries, and the None type. Each data type is briefly described with examples to illustrate their usage. The notes aim to help beginners understand the fundamental concepts without going into depth.

Uploaded by

Olivia Gomez
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

python data types notes (rough)

these r just basic notes, not too deep. written to understand not to impress.

numbers
int -> whole numbers. no decimal. like 1, 5, -3. used for counting n all.
float -> decimal numbers. like 2.5, 9.0. used for money n measurements.
complex -> has j in it. barely used tbh. just know it exist.

string (str)
anything inside quotes. "hello", 'elle', "123". numbers in quotes r still text.

boolean
only true or false. used in if else stuff mostly.

list
collection of items. ordered. can change. allows duplicates.
example: fruits = ['apple', 'banana', 'mango']

tuple
same as list but cant change. once made its fixed.
example: coords = (10, 20)

set
stores only unique values. no duplicates allowed. unordered.
example: {1,2,2,3} -> {1,2,3}
types of sets
normal set -> can change it.
empty set -> use set(). {} is not empty set.
frozen set -> cant change. rare use.

dictionary
key value pairs. used to store real data.
example: person = {'name':'elle','age':20}

none
means nothing is assigned. not 0. just nothing.

thats it. enough to understand basics.

You might also like