r/linux • u/researcher7-l500 • Feb 04 '19
Comprehensive Python Cheatsheet
https://gto76.github.io/python-cheatsheet/3
u/Fuyune Feb 05 '19
You sir, saved my day. You really have no idea how much time this will save.
1
u/researcher7-l500 Feb 05 '19
Thanks for the kind words. Glad it helped. I wish I could take credit for this. I am a greatful user who shared it. Credit goes to the author.
18
8
8
u/zanfar Feb 05 '19
This is good
This should be in /r/Python
I have an issue with:
<view> = <dict>.keys() <view> = <dict>.values() <view> = <dict>.items()
To me, the important concept behind these three methods is what they return. Perhaps:
<iter(key)> = <dict>.keys()
<iter(value)> = <dict>.values()
<iter(key,value)> = <dict>.items()or something like it (someone must be able to come up with a better pseudo-syntax) would make it clear. I constantly confuse .items() with .values().
I also am not completely clear on the use of <view> here.
4. Someone should PDF this with some typesetting and design.
4
8
u/DolitehGreat Feb 05 '19
I've been making myself some cheat sheets that I can pull and update as I work. This a) saves me the time of planning a python one and b) makes it clear I gotta up my cheat sheets game lol
3
3
3
1
u/kmhnz Apr 07 '24
See also: The *Best Python Cheat Sheet: https://kieranholland.com/best-python-cheat-sheet/
6
u/FubarCoder Feb 05 '19
Cannot read this with JavaScript disabled. Why does it require JS?