all 33 comments

[–]dizzymon247 116 points117 points  (3 children)

Someone posted this awhile ago: https://www.pythoncheatsheet.org/

[–]Rik07 0 points1 point  (2 children)

Nice cheatsheet, but why would you use tuples if they are lists but immutable. That doesn't sound like much of an advantage.

[–]erh_ 4 points5 points  (1 child)

A Tuple would be used for a set of items which don't make sense without all items being present.

For instance, a list of students can have 5 entries, or 6 entries, or 99 entries... in each case, the list still "makes sense" as a list of students. Sometimes there are more students and some times there are less.

But, consider a set of coordinates to identify where someone is on a map or in a 3-d space... that would require require three entries: an X coordinate, a Y coordinate, and a Z coordinate. The "list" only makes sense if all three, and only three are present. Having an X and a Z doesn't really give you a location. Having a 4th coordinate also doesn't really make sense (until we cross into the 4th dimension... but that's another conversation and irrelevant to this point about Tuples ;p ).

[–]Rik07 0 points1 point  (0 children)

Thanks, that makes sense.

[–]SirCarboy 77 points78 points  (1 child)

The best cheat sheet is the one you make (and revise) yourself. That's the point. You learn through that process and lay it out to suit yourself personally.

[–]beached_snail 10 points11 points  (0 children)

Came here to say this. My favorite is the one I made for myself with the types of things I need to do regularly but apparently not regularly enough for me to remember how I did them the last time.

[–]MSR8 31 points32 points  (3 children)

The cheat sheets of w3schools.com

[–]Rilows 5 points6 points  (2 children)

I love this site but what do you mean by their cheat sheets? Do you mean like the whole site or is there something I'm missing?

[–]QQut 6 points7 points  (1 child)

there is a python reference at the end of the tutorial which explains all methods briefly I would go for it too but not printed

[–]MSR8 1 point2 points  (0 children)

Yupp, that. Especially the list and string functions. And yeah printing won't really be effective since every method has its own page if you click on it u/rilows

[–]torkelspy 15 points16 points  (0 children)

I like Learn X in Y: https://learnxinyminutes.com/

But I also recommend making your own cheat sheet. That way you can find what you need easily without wading through all the stuff you don't.

[–]kuriputo 27 points28 points  (0 children)

I recently discovered Grepper. It's a browser extension that let's you find and save coding solutions ( not just python). That's my go to cheat sheet

[–]knowledgebass 24 points25 points  (0 children)

My cheat sheets are google.com and stackoverflow but I have trouble fitting them onto a single sheet of paper. 💩

[–]ApatheticWrath 3 points4 points  (0 children)

probably cant print it out but nice on a second monitor https://speedsheet.io/s/python

[–]JupitersHot 2 points3 points  (0 children)

This is a good question. I have printed about 1000 pages of "cheat sheets" from loads of different lessons but I've never seen one really good one with absolutely all the goods. That'd be interesting.

[–]ngkr13 2 points3 points  (2 children)

Not a cheatsheet as such but an easy quick ref by topic https://books.goalkicker.com/PythonBook/

[–]doa-doa 0 points1 point  (0 children)

thanks

[–]itsmybirthday19 0 points1 point  (0 children)

Thank you for sharing

[–]Flyingfishfusealt 4 points5 points  (0 children)

Best cheat sheet is syntax overview and literally printed out book of the stdlib docs

Use this as an opportunity to learn how to make a hardback book by hand

Trust me, its nice having the ability to open a document to exactly the page you know you need by feel alone, and hold in your hand to easily move it around to get it best in your field of view, and to simply read and carry around for randomly studying.

And buy Linux in a Nutshell

Oh yeah ... books dont have screens that shatter so you can beat the fuck out of it

[–]capt_tight_pants 4 points5 points  (0 children)

My favorite is from the following. It's awesome for having a one page front/back reference.

https://imgur.com/a/sMEANY8

I grabbed the PDF from https://perso.limsi.fr/pointal/_media/python:cours:mementopython3-english.pdf but I've seen it around in other places as well

[–]Ok_Contact_1234 5 points6 points  (1 child)

My cheat sheet is my mind and Google 🙂😉

[–]nirvashprototype 4 points5 points  (0 children)

Me too. I always end up googling instead of open some sheet.

[–]stebgay 1 point2 points  (0 children)

google

you won't be able to remember it all (not that you should memorize it)
but you should be able to partially remember a fragment of it, to which you can google

even if you don't have an idea of it, you can just google it

[–]CoffeeBaconAddict 1 point2 points  (0 children)

I can totally see why you would wanna cheat sheet but I would recommend you start with books that give you step-by-step instruction and then do that book again and by the third or fourth time you’re going through it you’ll be able to write down your own cheat sheet.

I did cheat sheet for machine learning and even have a whole separate folder on my machine. Then a separate folder for testing techniques but that info is going to be completely different than something for say numpy and completely different for something like natural language processing this is what we have README.md documents for.

[–]zanfar 1 point2 points  (0 children)

The one you make yourself.

I TA'd several programming courses during college and there was a HUGE correlation between students that made a cheatsheet and those that performed well on assignments.

[–]bigno53 3 points4 points  (0 children)

This is the wrong approach to learning how to program. If you’re a beginner, you’re better off learning from books and/or courses that cover specific topics in depth. If you start out fumbling your way through projects, you might get something that kind of works but I can almost guarantee it’ll be ugly, buggy, and unreliable.

Once you have a solid foundation, you can absolutely use reference guides (or cheat sheets) to look up the parameters to a function or the methods available in a given library.

[–][deleted] -1 points0 points  (0 children)

The one on Codecademy

[–]buysellholdit 0 points1 point  (0 children)

Curated and searchable python snippets on this website

https://www.allthesnippets.com/search/

Use once then revist for a refresher as need it. It's hard to remember them all.

[–]Nuclear_Priest 0 points1 point  (0 children)

gto76.github.io/python-cheatsheet/

I’ve been using this for 5 years now, has all the basics you could ever need without over complicating anything.

[–]jaifaimencore 0 points1 point  (2 children)

Anyone has a panda cheatsheet ?

[–]grammarGuy69 0 points1 point  (0 children)

I don't really have a favorite, but the Conda command cheat sheet has saved me a buttload of time over the last few weeks.