r/pythontips • u/wilfredinni • Sep 12 '18
Python Cheatsheet Website - pythoncheatsheet.org
Anyone can forget how to make character classes for a regex, slice a list or do a for loop. This cheat sheet tries to provide a basic reference for beginner and advanced developers, lower the entry barrier for newcomers and help veterans refresh the old tricks.
Hope this is of help. Have a nice day =)
Edit: For some reason, the mobile version on chrome and safari is messed up, so prefer Firefox for now to use the quick search and the return to top button (or zoom out in chrome)
2
u/SangCoGIS Sep 13 '18
Great resource though i do have a question. The bit on variables says variables should only be one word? Is this a pep8 rule or preference of the author? As I frequently use, and see others use, variables with 2 words and on a rare occasion 3 words.
1
u/wilfredinni Sep 13 '18
You can:
my_variable = 0But you can't:
my variable = 0Not a matter of preference, but syntax... and I think is not well explained lol I will fix it later. Thank you.
2
u/SangCoGIS Sep 13 '18
Yeah thats not explained well. I fully understand that there can be no spaces in a variable name which is what I think you were trying to say. Either way, I love the site as a whole. If i find any other things that don't make sense i'll pm you my feedback if you like
1
3
2
u/[deleted] Sep 13 '18
This is awesome! Will definitely contribute to this from a web developer side on Github! :D