Python Language: Difference between revisions
Jump to navigation
Jump to search
Line 24: | Line 24: | ||
x = 1 | x = 1 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
The assignment accepts [[#Expressions|expressions]]: | |||
<syntaxhighlight lang='python'> | |||
x = x + 1 | |||
</syntaxhighlight> | |||
=Functions= | =Functions= | ||
=Expressions= | =Expressions= |
Revision as of 04:34, 22 May 2021
Internal
Reserved Words
Reserved words can only be used to mean the thing Python expects them to mean. They cannot be used as variable names or identifiers.
False |
class |
return |
is |
finally
|
None |
if |
for |
lambda |
continue
|
True |
def |
from |
while |
nonlocal
|
and |
del |
global |
not |
with
|
as |
elif |
try |
or |
yield
|
assert |
else |
import |
pass
| |
break |
except |
in |
raise
|
Statements
Assignment Statement
x = 1
The assignment accepts expressions:
x = x + 1
Functions
Expressions
Variables
Identifiers
Organizatorium
- statement vs function. print is a statement in python 2, print() is a function in python3.