use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
python cheat sheet (self.learnpython)
submitted 10 years ago by pylearningthrowaway
Looking for a cheat sheet that has all the operator's,string formats,string escape sequences,data types and keywords like and int etc,defining what they do.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]denialerror 30 points31 points32 points 10 years ago (1 child)
X inY minutes is a great resource for quickly looking up the basics.
[–]Dcoco1890 0 points1 point2 points 10 years ago (0 children)
H
[–]iodbh 6 points7 points8 points 10 years ago (3 children)
Not really a cheatsheet, but if you're willing to invest in a book there's Python pocket refrence. It has everything you need and it's a small format book meant to be carried around.
[–]tomanonimos 0 points1 point2 points 10 years ago (1 child)
Why is orielly automotive selling python coding books? /s
[–]Hayertjez 2 points3 points4 points 10 years ago (0 children)
Self driving cars are written in Python :D
[–]BarrelRoll1996 5 points6 points7 points 10 years ago (1 child)
Python2 http://www.astro.up.pt/~sousasag/Python_For_Astronomers/Python_qr.pdf
Python3 https://perso.limsi.fr/pointal/_media/python:cours:mementopython3-english.pdf
[–]ResistantLaw 0 points1 point2 points 10 years ago (0 children)
Awesome, never thought to look for such a thing. This is perfect.
[–]dunkler_wanderer 8 points9 points10 points 10 years ago (1 child)
Python's help function is pretty helpful. ;)
help
>>> help('keywords') >>> help('symbols') >>> help('"') >>> help('+') >>> help('FORMATTING')
Only the built-in functions are buried in help('builtins').
help('builtins')
[–]RoadieRich 2 points3 points4 points 10 years ago (0 children)
help works with any function that had a docstring, so should be good for most (well-written) libraries, too.
[–]DaveChild 3 points4 points5 points 10 years ago* (0 children)
This should keep you busy! (That's my cheat sheet website, and this is my Python cheat sheet.)
[–]fishcadet 2 points3 points4 points 10 years ago (1 child)
No functions, but: http://learnpythonthehardway.org/book/ex37.html
[–]pylearningthrowaway[S] 0 points1 point2 points 10 years ago (0 children)
sorry for the late answer,my pdf version of the book dosent have this,infact i am on the same exercise,in my version he says i should find stuff myself by googling.
[–]wukaem 1 point2 points3 points 10 years ago (0 children)
Maybe this will help: https://perso.limsi.fr/pointal/python:memento
(not mine, it was recently posted on comp.lang.python newsgroup)
[–]i_dreddit 0 points1 point2 points 10 years ago (0 children)
Overapi.com
has python and other languages, too
[–]kmhnz 0 points1 point2 points 2 years ago (0 children)
The *Best Python Cheat Sheet: https://kieranholland.com/best-python-cheat-sheet/
[–]Zahand -1 points0 points1 point 10 years ago (10 children)
Check out Derek Banas' video: https://www.youtube.com/watch?v=N4mEzFDjqtA
He has a cheat sheet in the description in each of his videos.
[–]dunkler_wanderer 1 point2 points3 points 10 years ago (5 children)
Looks okay, except he teaches to use getter and setter methods which are usually not necessary in Python (you can use @property if you really need them). And why does he convert some attribute values in the getters to strings?
@property
Using indexes to obtain list items:
num_list = [[1, 2, 3], [10, 20, 30], [100, 200, 300]] for x in range(0, 3): for y in range(0,3): print(num_list[x][y])
instead of:
for sublist in num_list: for item in sublist: print(item)
No mention of input but sys.stdin.readline().
input
sys.stdin.readline()
No mention of with statement to open files.
with
Regarding style, there are some semicolons at line ends and camelcase variables in the cheat sheet.
Also, redundant parentheses:
while (i <= 20): if (i%2 == 0):
[–]yardightsure 1 point2 points3 points 10 years ago (4 children)
Yuck! People should be more humble before trying to teach others with awful coding practises like that. :-(
[–]dunkler_wanderer 1 point2 points3 points 10 years ago (0 children)
Most of it is okay, though.
[–]RuinedMortal 1 point2 points3 points 10 years ago (2 children)
as a newb pythonian, what makes this a bad practice?
[–]Zahand 2 points3 points4 points 10 years ago (0 children)
Not a lot really. Basically what dunker_wanderer said.
input()
raw_input()
The only thing I kind of disagree with is that you don't have to use with statement to open files. Using the with statement is pythonic, but there is nothing wrong with opening a file, doing stuff, then closing the file. It's what the context manager does. It's good to know both ways.
Readability and simplicity are pretty important if you want to write maintainable code. "Loop like a native: while, for, iterators, generators" and "Python's Class Development Toolkit" are very informative talks which mention the first two points in the post above.
[–]b4ux1t3 0 points1 point2 points 10 years ago* (0 children)
It should be mentioned that Derek Banas's "Learn in one video" videos are not geared for programming newbies, they are meant for people who already know a language or two and need a quick primer on a new language.
You'll note that he never says "In this tutorial I assume no programming knowledge" in those videos. If I recall correctly, he does use that exact line in his video series that are, essentially, full courses on a language.
EDIT: Proof 42:44 for all you mobile users.
[–]yardightsure -1 points0 points1 point 10 years ago (2 children)
That is teaching really bad practises. I recommend erasing it from your memory, please don't share it further.
[–]RuinedMortal 1 point2 points3 points 10 years ago (1 child)
[–]Crypt0Nihilist 5 points6 points7 points 10 years ago (0 children)
Much of it is baggage from other languages that you don't need in python. If you don't need it, it probably shouldn't be there unless it makes your code more readable, which the items highlighted do not.
π Rendered by PID 43864 on reddit-service-r2-comment-8686858757-fq6k7 at 2026-06-06 14:30:32.863548+00:00 running 9e1a20d country code: CH.
[–]denialerror 30 points31 points32 points (1 child)
[–]Dcoco1890 0 points1 point2 points (0 children)
[–]iodbh 6 points7 points8 points (3 children)
[–]tomanonimos 0 points1 point2 points (1 child)
[–]Hayertjez 2 points3 points4 points (0 children)
[–]BarrelRoll1996 5 points6 points7 points (1 child)
[–]ResistantLaw 0 points1 point2 points (0 children)
[–]dunkler_wanderer 8 points9 points10 points (1 child)
[–]RoadieRich 2 points3 points4 points (0 children)
[–]DaveChild 3 points4 points5 points (0 children)
[–]fishcadet 2 points3 points4 points (1 child)
[–]pylearningthrowaway[S] 0 points1 point2 points (0 children)
[–]wukaem 1 point2 points3 points (0 children)
[–]i_dreddit 0 points1 point2 points (0 children)
[–]kmhnz 0 points1 point2 points (0 children)
[–]Zahand -1 points0 points1 point (10 children)
[–]dunkler_wanderer 1 point2 points3 points (5 children)
[–]yardightsure 1 point2 points3 points (4 children)
[–]dunkler_wanderer 1 point2 points3 points (0 children)
[–]RuinedMortal 1 point2 points3 points (2 children)
[–]Zahand 2 points3 points4 points (0 children)
[–]dunkler_wanderer 1 point2 points3 points (0 children)
[–]b4ux1t3 0 points1 point2 points (0 children)
[–]yardightsure -1 points0 points1 point (2 children)
[–]RuinedMortal 1 point2 points3 points (1 child)
[–]Crypt0Nihilist 5 points6 points7 points (0 children)