python
dz / pythonSummary
stuff about python
Subgraphs
Node Tree
- boolean_value_coercion
- docs
- double_colon_operator
- heapsort_examples
- pop_on_empty_stack
- pyright
- repeat_strings
- timsort
- unpacking_argument_lists
- walrus_operator
Nodes
| walrus_operator | |
| content | the walrus operator |
| remarks | this came up while looking up how to parse a file line-by-line in python. |
| hyperlink | https://docs.python.org/3/whatsnew/3.8.html#assignment-expressions |
| location | knowledge/python.dz:4 |
| timsort | |
| content | Timsort: the underlying algorithm used by Python for =sort= and =sorted=. |
| remarks | Found via Fluent Python, via EV |
| hyperlink | https://en.wikipedia.org/wiki/Timsort |
| location | knowledge/python.dz:10 |
| heapsort_examples | |
| content | heapsort examples |
| hyperlink | https://docs.python.org/3/library/heapq.html#basic-examples |
| location | knowledge/python.dz:16 |
| docs | |
| content | Python Documentation |
| children | docs/glossary |
| hyperlink | https://docs.python.org/3/ |
| location | knowledge/python.dz:20 |
| double_colon_reverse | |
| content | x[::-1] can be used to reverse items in a list |
| parents | double_colon_operator, leetcode/problems/125_valid_palindrome |
| location | knowledge/python.dz:144 |
| double_colon_operator | |
| content | double colon operator: x[start:stop:step] |
| children | double_colon_reverse |
| parents | docs/stdtypes/common_sequence_ops |
| location | knowledge/python.dz:149 |
| repeat_strings | |
| content | x = "hello", x*3 would be "hellohellohello" |
| parents | leetcode/problems/1071_GCD_of_strings |
| location | knowledge/python.dz:230 |
| boolean_value_coercion | |
| content | Boolean values can be coerced to ints using int(). int(True) is 1, int(False) is 0. |
| parents | javascript/coercion, leetcode/problems/1456_max_vowels_in_substring |
| location | knowledge/python.dz:261 |
| pop_on_empty_stack | |
| content | Pop on empty stack: stk.pop() if stk else None |
| parents | leetcode/data_structures/stack, leetcode/problems/2390_removing_stars_from_a_string |
| location | knowledge/python.dz:274 |
| unpacking_argument_lists | |
| content | Unpacking argument lits, aka "*x" (star operator) |
| children | javascript/spread_syntax (similar concept) |
| hyperlink | https://docs.python.org/3/tutorial/controlflow.html#unpacking-argument-lists |
| location | knowledge/python.dz:282 |
| pyright | |
| content | pyright: static type checker for python |
| hyperlink | https://github.com/microsoft/pyright |
| location | knowledge/python.dz:641 |