Simpli ed [ Intermediate Python ]
8 Important Concepts and Language Features in
Python
In this short video, we will discuss eight important
concepts and language features in Python that are
essential to know.
References
When you assign a variable to another variable, you
are creating a reference in the computer's memory
and storing it in the variable. Changing the value of a
variable is actually making it refer to a completely
di erent value in memory. Immutable values like
integers do not change, but mutable data types like
lists can be altered. To change a value inside a list,
you can simply assign a new value to a speci c
index.
Functions
To de ne a function, you need to use the def
keyword. You can then use the function by invoking it
with arguments. You can also de ne anonymous
functions or lambda expressions using the lambda
keyword. However, you cannot use them directly
without giving them a name.
ff
fi fi fi fi