r/Python • • Oct 05 '16

Python Cheat Sheet

https://www.cheatography.com/davechild/cheat-sheets/python/
79 Upvotes

32 comments sorted by

View all comments

32

u/XtremeGoose f'I only use Py {sys.version[:3]}' Oct 05 '16

Python 2.

I don't think this is very useful to be honest.

7

u/Dumbaz Oct 05 '16

According to the comment section, last time something changed on that website was in late 2014. Out of date.

3

u/DaveChild Oct 05 '16

Yup, it's my cheat sheet and badly needs updating. I really should do a Python 3 one but there are already a lot of good ones.

1

u/_FreeThinker Oct 06 '16

can you point me to one for Python 3 please?

3

u/LovecraftInDC Oct 06 '16

https://perso.limsi.fr/pointal/_media/python:cours:mementopython3-english.pdf

That one seems solid, but honestly my cheat sheet is generally 'my problem/error message' in google.

1

u/PaulSandwich Oct 05 '16

Any good leads on a Python 3 cheatsheet? Coincidentally, I went digging for one last week for a Django project and the results were flooded with version 2.

4

u/[deleted] Oct 05 '16

Stackoverflow.

2

u/PaulSandwich Oct 05 '16

They close the topic pretty quickly over at S.O. as being outside their format. The answers that slip through (at least for the first page of results) are, like I said, for python 2 or just links to the documentation.

2

u/[deleted] Oct 06 '16

Honestly, I'm not really sure how much of a help a cheatsheet for something like a programming language is. When I don't know or can't remember something S.O., the Official Python Docs or a blog found through google is usually where I find an answer. If you're looking for something specific to Py3 then make sure to put that in your Google Search: e.g. 'Python 3 list slicing'.

While 2 and 3 aren't binary compatible, I've personally found the most 2 code will work with a bit of fiddling.

(hope all this isn't too obvious)

1

u/LovecraftInDC Oct 06 '16

I just came to 3 after having very limited experience with 2 a few years ago. Google solved almost all of my issues, though.

1

u/PaulSandwich Oct 10 '16

Funny; if I think about it I've barely used any of the cheatsheets I've found for other projects. They're most useful for introducing me to other functions in the family of ones I'm already familiar with and giving me a head-start on what to google or where to look in the docs.

2

u/DaveChild Oct 05 '16

There's a lot more on Cheatography and I add links to new ones when I find them. If you do find any more, please let me know or add them to the site.