This is an old revision of the document!
Overview
First pass at Python course topics.
Links:
… coming …
Packages
python3(Python 3.7)
$ python3 -V Python 3.7.4 $
STUFF
>>> quit()
Basics
Arguments
import sys print(sys.argv[0])
Printing
>>> print("hi")
>>> print("I am", age, "years old.")
>>> print(f"I am {age} years old.") (format string)
>>> hilarious = False
>>> joke_evaluation = "Isn't that joke so funny?! {}"
>>> print(joke_evaluation.format(hilarious))
>>> print("Isn't that funny? {}".format(hilarious))
>>> print(end1 + end2 + end3 + end4 + end5 + end6, end=' ')
>>> print(end7 + end8 + end9 + end10 + end11 + end12)
>>> formatter = "{} {} {} {}"
>>> print(formatter.format(1, 2, 3, 4))
>>> print(formatter.format("one", "two", "three", "four"))
Strings
Raw strings: r“blah blah”