Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| python [2019/07/31 16:00] – [Printing] rpjday | python [2020/06/17 14:40] (current) – rpjday | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| ... coming ... | ... coming ... | ||
| + | |||
| + | ===== Internal links ===== | ||
| + | |||
| + | * [[Python_file_hierarchy]] | ||
| ===== Packages ===== | ===== Packages ===== | ||
| Line 16: | Line 20: | ||
| $ | $ | ||
| </ | </ | ||
| + | |||
| + | ===== Online tutorial ===== | ||
| + | |||
| + | ==== 3 ==== | ||
| + | |||
| + | * string operations | ||
| + | * string slices | ||
| + | |||
| + | ==== 4 ==== | ||
| + | |||
| + | * " | ||
| + | * range() function is an " | ||
| + | * keyword arguments | ||
| + | * lambda expressions | ||
| + | * docstrings | ||
| + | * function annotation(??? | ||
| + | |||
| + | ==== 5 Data structures ==== | ||
| + | |||
| + | * lists | ||
| + | * " | ||
| + | * list comprehensions | ||
| + | * set | ||
| + | * dictionary | ||
| + | * key can be any immutable type | ||
| + | * " | ||
| + | * " | ||
| + | * " | ||
| + | |||
| + | ===== TOPICS ===== | ||
| + | |||
| + | * string method join() | ||
| + | * data types, numbers, literals | ||
| + | * " | ||
| + | * single and double quoted strings identical effectively | ||
| + | * raw strings | ||
| + | * " | ||
| + | * list(range(1, | ||
| + | * tuple(range(1, | ||
| + | * loops and trailing " | ||
| ===== STUFF ===== | ===== STUFF ===== | ||
| * '' | * '' | ||
| + | * PEP-8 | ||
| + | * function annotations | ||
| ===== Basics ===== | ===== Basics ===== | ||
| + | |||
| + | ==== Arguments ==== | ||
| + | |||
| + | < | ||
| + | import sys | ||
| + | print(sys.argv[0]) | ||
| + | </ | ||
| ==== Printing ==== | ==== Printing ==== | ||
| Line 37: | Line 90: | ||
| >>> | >>> | ||
| >>> | >>> | ||
| + | |||
| + | >>> | ||
| + | >>> | ||
| + | >>> | ||
| </ | </ | ||
| + | ==== Strings ==== | ||
| + | |||
| + | Raw strings: r"blah blah" | ||
| + | |||
| + | < | ||
| + | print(""" | ||
| + | Usage: thingy [OPTIONS] | ||
| + | | ||
| + | -H hostname | ||
| + | """ | ||
| + | </ | ||
| | | ||