what python do
what is phyton datat types
Variables can store data of different types, and different types can do different things
Lists are used to store multiple items in a single variable.
Lists are one of 4 built-in data types in Python used to store collections of data, the other 3 are Tuple, Set, and Dictionary, all with different qualities and usage.
what dictionaries used
to store data values in key:value pairs.
what is a Python Operators
Operators are used to perform operations on variables and values
examples or phyton
print("Hello, World!")
Mapping Type:
dict
Lists are created using
square brackets :
Dictionaries are written with curly brackets, and
have keys and values
we put + yes or no
yes we use the + operator to add together two values
what is a python indentation
Indentation refers to the spaces at the beginning of a code line.
Where in other programming languages the indentation in code is for readability only, the indentation in Python is very important.
Set Types: set or frozenset
set and frozenset
List Items
are ordered, changeable, and allow duplicate values.
Example
Create and print a dictionary:
hisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
print(thisdict)
Python divides the operators
why python
different types of python data types
Text Type:strNumeric Types:int, float, complexSequence Types:list, tuple, range
note of ordered
There are some list methods that will change the order, but in general: the order of the items will not change.
Dictionary Items are
ordered, changeable, and does not allow duplicates.
what is a
Python Arithmetic Operators
Arithmetic operators are used with numeric values to perform common mathematical operations:
There are three numeric types in Python:
python numbers
Example
Print the data type of the variable x:
x = 5
print(type(x))
what is a Ordered
When we say that lists are ordered, it means that the items have a defined order, and that order will not change
dictionaries Ordered or Unordered?
ordered
what is a Python Identity Operators
Identity operators are used to compare the objects, not if they are equal, but if they are actually the same object, with the same memory location: