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.

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/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.