First pass at Python course topics.
Links:
… coming …
python3
(Python 3.7)$ python3 -V Python 3.7.4 $
>>> quit()
import sys print(sys.argv[0])
>>> 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"))
Raw strings: r“blah blah”
print("""\ Usage: thingy [OPTIONS] -h Display this usage message -H hostname Hostname to connect to """)