Examples in Python 3
"""
Create some variables
"""
x = 42
print(x)
y = 4.2
print(y)
text = "Hello world!"
print(text)
a, b = 4, 2
print(a)
print(b)"""
Following examples will lead to syntax errors as the variables names are illegal
"""
# Leading numbers
5ants = "More than 4 elephants"
# Illegal characters
@nt$ = 5
# Keywords
from = "Sweden"The following words can not be used to name variables, as they are keywords:
False class finally is return
None continue for lambda try
True def from nonlocal while
and del global not with
as elif if or yield
assert else import pass
break except in raise
2014-07-16 (sylvanas) PA1 First try.