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