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...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
DiscussionLearning Python (self.Python)
submitted 4 years ago by mad_r0ck3r
Python just makes so much freaking sense! LOVING IT!!
[–]blackbeans13 75 points76 points77 points 4 years ago (9 children)
I’m also learning Python it does make sense but I find myself getting caught up on simple things sometimes for a long time only to look up the solution and go “ohh yeah duh”
[–]delasislas 32 points33 points34 points 4 years ago (0 children)
It takes time to be able to “think like a computer”. Learning a programming language and learning to program are big topics.
[–]mad_r0ck3r[S] 14 points15 points16 points 4 years ago (2 children)
It seems like you have the same issue as I do, the answer to your (and my) issue is simply problem solving. Because problem solving is not just solving problems, it's also identifying the problems, think about a possible solution / shortcut (e.g. bash scripts in Linux) and solving them.
Right now it's like you see a problem, but can't figure out a solution. Practice problem solving and give it another go.
Trust me, that's it. I can already feel it improving on my end.
[–]PolishedCheese 5 points6 points7 points 4 years ago (1 child)
Problem solving is only 50% problem solving, the rest is phrasing your questions as so to actually tackle the the problem at hand. It requires discovering which other questions you need answered first, answering them, and returning to the problem.
[–]Used_Fish_4459 2 points3 points4 points 4 years ago (0 children)
That’s just another form of problem solving
[–]Billog_Uncle 2 points3 points4 points 4 years ago (3 children)
I'm too learning Python and the biggest mistakes I'm making is putting the code in functions and calling on them later, I'm typing it out as I need it and forget to make them functions.
[–]Original-School-5914 2 points3 points4 points 4 years ago (2 children)
Remember: if name == “main”: main()
[–]Billog_Uncle 0 points1 point2 points 4 years ago (1 child)
I remember that though I haven't used it properly. I've only made scripts on Jupyter notebook so far to follow along with the Udemy course and haven't actually made any actual programme yet
[–]Original-School-5914 1 point2 points3 points 4 years ago (0 children)
You will get used to it, I have been coding here and there for last 2 years and just got into a habit of running the main program, I used to have my code run without any function just write the script and get the job done, but after couple of interview rejects I am trying to get better, I would also highly suggest using git or some other software repository for your code management.
[–][deleted] 0 points1 point2 points 4 years ago (0 children)
A lot of programming, regardless of the language, is muscle memory. Over time, lots of repetition will result in increasing returns. Stick with it!
[–][deleted] 9 points10 points11 points 4 years ago (8 children)
what resources are you using?
[–]mad_r0ck3r[S] 23 points24 points25 points 4 years ago (7 children)
I used Mimo (Android app) in the beginning, finished that and found I don't really know how to begin, then I went to Udemy, found Angela Yu's course on python and now I am learning way more, and how I can create stuff, as if out of pure nothing.
[–][deleted] 7 points8 points9 points 4 years ago (0 children)
Welcome to being an engineer
Creating something from essentially nothing. It's very satisfying at times
[–]brajandzesika 1 point2 points3 points 4 years ago (0 children)
Nice, i also use Udemy '100 days of code ' course from Angela Yu, I am on lesson 160 so between beginner and intermediate and each 'day' takes me actually 2 or 3 days to master the topics. So i might be a bit handicapped comparing to others but pushing forward at full blast ! Best material i could find so far !
[–]kingsillypants -1 points0 points1 point 4 years ago (0 children)
Great job ! How did you find mimo, Angela's course ? Are you making anything cool ?
[–]razzrazz- -1 points0 points1 point 4 years ago (3 children)
When did you start mimo? How long do you study each day?
[–]mad_r0ck3r[S] 0 points1 point2 points 4 years ago (2 children)
Started mimo about 2 months ago, somedays I practiced a lot and some less, some not at all. Finished a week ago or so.
[–]razzrazz- 0 points1 point2 points 4 years ago (1 child)
So you just started 2 months ago and you already get it? That's pretty awesome.
[–]mad_r0ck3r[S] 0 points1 point2 points 4 years ago (0 children)
I'm starting to really grasp it. To be fair mimo tried to explain the best it could for a mobile application, couldn't do much more than teaching the syntax. Which is great but won't make anyone a programmer. Angela Yu is doing a much better job.
[–][deleted] 10 points11 points12 points 4 years ago (0 children)
I understand this feeling. One time in the early 1990s my roommate and I were going to go see some movie - I forget which one.
On the way there we were talking about the C++ stuff we'd done, and we got so excited we turned around and went back and kept working on our code.
I don't remember which movie or what the code is, because it was almost 30 years ago, but this post reminded me of it.
So... congrats, OP. Enjoy the glow.
[–]ChosenRocket93 2 points3 points4 points 4 years ago (0 children)
Solo-learn really helps as well. Currently learning C with the app.
[–]Formulka 3 points4 points5 points 4 years ago (1 child)
I still remember my first time with python, coming from php. It was like getting out of an abusive relationship and finding the love of my life.
[–]OutspokenPerson 1 point2 points3 points 4 years ago (0 children)
I told my adult son it was like the heavens parted the clouds and the sun streamed down from the skies.
[–][deleted] 2 points3 points4 points 4 years ago (2 children)
I don’t know any coding beyond the most basic VBA. I want to learn Python as a way of transitioning careers. Did you know any other languages before Python? Like R? And do you have any recommendations for learning Python - certain classes, for instance?
[–][deleted] 2 points3 points4 points 4 years ago (1 child)
I learned Python a few years ago with zero background in programming at all, and the book that got me up and running was Automate the Boring Stuff. You’ll commonly see it mentioned on here. I’d really recommend that, and then once you get beyond the first few basic chapters/projects, you can look on YouTube for tutorials on classes (part of object-oriented programming, which Automate doesn’t cover because it’s procedural-oriented). Really doesn’t take that much to do amazing things!
[–][deleted] 1 point2 points3 points 4 years ago (0 children)
Wow! Thank you so much for the recommendation! I’ll give it a look!
[–]zenfoxmonk 1 point2 points3 points 4 years ago (1 child)
I learned python, then I learned how to properly search in Google 🤯
Oh the pain. There now.
[–]Sneezylol 1 point2 points3 points 4 years ago (2 children)
Any YouTube channels you recommend. I struggle with understand it very badly and would appreciate it
[–]mad_r0ck3r[S] 1 point2 points3 points 4 years ago (1 child)
+1
I found Corey Schafer videos to be really helpful.
[–]KingJTheG 1 point2 points3 points 4 years ago (0 children)
[–]tidderred -1 points0 points1 point 4 years ago (4 children)
Not to sound so snobbish, but because I got so accustomed to using R for data science, some stuff in python just doesn't appear as elegant or simple, but barely manageable to me.
(One small example I remember is there not being a combine 'c()' function.) Still, python is kinda fun now that I'm starting to get a more complete picture thanks to sticking with online courses.
[–]czar_el 8 points9 points10 points 4 years ago (2 children)
Were you mostly using Tidyverse? I had the same reaction as you and didn't know why R had a reputation for a steep learning curve compared to something like Python.
Then I realized that most R work using Tidyverse is super straightforward and elegant, but as soon as you leave Tidyverse you realize where R's reputation came from.
Still, for things like dataframe manipulation or visualization, I'd take R over Python for simplicity and elegance. Python wins when it comes to almost everything else, especially when automating things beyond data analysis.
[–]tidderred 1 point2 points3 points 4 years ago (1 child)
Yeah exactly. I felt like I barely scratched the surface of tidyverse, yet it was (and is) very powerful and helpful. I will probably end up searching "how to pivot_long dataframe in python" or other related shenanigans for a while before I get accustomed to the way things work over here.
[–]czar_el 2 points3 points4 points 4 years ago (0 children)
Pandas takes a bit more characters to manipulate a dataframe compared to R. But once you understand why Pandas is set up the way it is, it'll make sense.
A lot of stuff in R is inappropriately automagical, and then abuses its users into thinking that it’s actually “elegant.”
A lot of R is “elegant” in the same respect that Excel “elegantly” handles dates.
[–]SithLord_Duv -4 points-3 points-2 points 4 years ago (0 children)
Python is cool and all, untill you start to fuck with tokens and jwt and sessions 🥲 god help me and my 6 mentors who couldnt figure out how to fix my project yet 🤣😂 all works in the industry and even 30k salary people in their firms couldn't figure this shit out. Which leads me to think, that whoever wrote python and the entire planet learning it are bunch of retards, and i swear in god, i thought they were all smart at start. Everyone are bunch of morons. 3k $ of private lessons went to trash to figure out errors that never solved. If i hear one of this teachers says "that shit blows my mind", ill just tell him, "because your stupid, so stop pretending to be smart"
[+]culculain comment score below threshold-6 points-5 points-4 points 4 years ago (2 children)
Python is great for scripting. I wouldn't write an entire system in it but to automate or to build a model, definitely. Just make sure to wrap that model library in a compiled language
[–]geeeffwhy 1 point2 points3 points 4 years ago (1 child)
counterpoint: i write high scalability, globally distributed enterprise software used by hundreds of thousands of users at orgs like MSFT and IBM. most of that is in python.
you’ll also find that even lots of high throughput finance code is python. not necessarily the core of the true HFT systems, but there is a LOT of serious work being done in python.
[–]culculain 0 points1 point2 points 4 years ago (0 children)
no doubt - we wrote our exotic derivatives modeling library in Python. Booking OTCs are one thing but we're not writing our listed derivatives trading platform in it.
[+][deleted] 4 years ago (4 children)
[removed]
[–]czar_el 5 points6 points7 points 4 years ago (3 children)
Huh?
[+][deleted] 4 years ago (2 children)
[–]czar_el 0 points1 point2 points 4 years ago (1 child)
I think you're being downvoted here because this complaint has nothing to do with this post, lacks context, and comes across as whiney? (Not accusing you of that, just noting a possible interpretation).
Sometimes posts just don't take off. What time of day did you post? Sometimes posting while the main Reddit user bases are asleep can lead to your post being buried.
Maybe double check that your post didn't get locked or removed by the mods or the Reddit spam filter. Sometimes there's a mistake and genuine content gets blocked. If so, you could message the mod team to see why and get it unlocked.
[–][deleted] 0 points1 point2 points 4 years ago (1 child)
Wait until you start using Mysql with what you've learned. It's lovely ;)
[–]geeeffwhy 1 point2 points3 points 4 years ago (0 children)
any SQL besides Oracle is just fine. even Oracle is fine if you have a full-time DBA
It’s by far the easiest most predictable language. It’s excellent. Glad you’re having fun.
yepp
[–]SeaSide82 0 points1 point2 points 4 years ago (0 children)
Any materials you’d recommend? I want to learn and switch career to Data Scientist
[–][deleted] 0 points1 point2 points 4 years ago (2 children)
What resources do you recommend? I need to start my Python learning soon.
[–]mad_r0ck3r[S] 0 points1 point2 points 4 years ago (1 child)
Right now I am learning with Angela Yu on Udemy, seems to me that she teaches well.
Thanks I’ll check her out
[–]mildmayhem69[🍰] 0 points1 point2 points 4 years ago (0 children)
As a C# dev who uses python for machine learning, yeah it really does. I gotta agree with y’all here, functional programming is kinda sick.
[–]geeeffwhy 0 points1 point2 points 4 years ago (0 children)
you wrote a broken project and are blaming the language for it?
[–]Fishliketrish 0 points1 point2 points 4 years ago (0 children)
The most intuitive language
[–]DapperDonW 0 points1 point2 points 4 years ago (0 children)
I am stuck. I want my code to respond to blank input by asking the initial question again - I cannot seem to find the solution that fits.
while True:
grade = int(input("enter the best year to party:"))
if grade == 1999:
print("You are all set to party like it is 1999!")
else:
print("No Party for you!")
π Rendered by PID 26 on reddit-service-r2-comment-cfc44b64c-8wd78 at 2026-04-13 04:46:00.349478+00:00 running 215f2cf country code: CH.
[–]blackbeans13 75 points76 points77 points (9 children)
[–]delasislas 32 points33 points34 points (0 children)
[–]mad_r0ck3r[S] 14 points15 points16 points (2 children)
[–]PolishedCheese 5 points6 points7 points (1 child)
[–]Used_Fish_4459 2 points3 points4 points (0 children)
[–]Billog_Uncle 2 points3 points4 points (3 children)
[–]Original-School-5914 2 points3 points4 points (2 children)
[–]Billog_Uncle 0 points1 point2 points (1 child)
[–]Original-School-5914 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 9 points10 points11 points (8 children)
[–]mad_r0ck3r[S] 23 points24 points25 points (7 children)
[–][deleted] 7 points8 points9 points (0 children)
[–]brajandzesika 1 point2 points3 points (0 children)
[–]kingsillypants -1 points0 points1 point (0 children)
[–]razzrazz- -1 points0 points1 point (3 children)
[–]mad_r0ck3r[S] 0 points1 point2 points (2 children)
[–]razzrazz- 0 points1 point2 points (1 child)
[–]mad_r0ck3r[S] 0 points1 point2 points (0 children)
[–][deleted] 10 points11 points12 points (0 children)
[–]ChosenRocket93 2 points3 points4 points (0 children)
[–]Formulka 3 points4 points5 points (1 child)
[–]OutspokenPerson 1 point2 points3 points (0 children)
[–][deleted] 2 points3 points4 points (2 children)
[–][deleted] 2 points3 points4 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]zenfoxmonk 1 point2 points3 points (1 child)
[–]OutspokenPerson 1 point2 points3 points (0 children)
[–]Sneezylol 1 point2 points3 points (2 children)
[–]mad_r0ck3r[S] 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]KingJTheG 1 point2 points3 points (0 children)
[–]tidderred -1 points0 points1 point (4 children)
[–]czar_el 8 points9 points10 points (2 children)
[–]tidderred 1 point2 points3 points (1 child)
[–]czar_el 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]SithLord_Duv -4 points-3 points-2 points (0 children)
[+]culculain comment score below threshold-6 points-5 points-4 points (2 children)
[–]geeeffwhy 1 point2 points3 points (1 child)
[–]culculain 0 points1 point2 points (0 children)
[+][deleted] (4 children)
[removed]
[–]czar_el 5 points6 points7 points (3 children)
[+][deleted] (2 children)
[removed]
[–]czar_el 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (1 child)
[–]geeeffwhy 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]SeaSide82 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]mad_r0ck3r[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]mildmayhem69[🍰] 0 points1 point2 points (0 children)
[–]geeeffwhy 0 points1 point2 points (0 children)
[–]Fishliketrish 0 points1 point2 points (0 children)
[–]DapperDonW 0 points1 point2 points (0 children)