python-cheatsheet
python-cheatsheet copied to clipboard
Comprehensive Python Cheatsheet
Simply runs a regex replacement after highlight.js does the rest of the highlighting. As a consequence, it does not highlight strings such as `` which contain a Python keyword. This...
```python import itertools nested_list1 = ["s", "r", [32, [32], 3]] flattened_list1 = list(itertools.chain.from_iterable(nested_list1)) print(flattened_list1) nested_list2 = [1, [1, 1, 3, [224, 4], []], [], [2, [23]]] flattened_list2 = list(itertools.chain.from_iterable(nested_list2)) print(flattened_list2)...
Navigating the HTML version of this cheat sheet would be easier if there was a floating table of contents.
In the Mario game code snippet the run function currently passes None into 'pressed' dict. disabling controls. Revised run function below fixes. Per PG documentation, get_pressed() isn't the best way...
Hello, I think adding a licence file would be useful as the actual licence of the project is a bit ambiguous (it is by default not possible legally to use...
Hello, I created a section describing how to record microphone to a wav file using sounddevice and scipy.
Hello, I add an example in Generator section describing how amazing yield can do in machine learning while classifiers cannot train a large amount of data simultaneously.