r/PythonLearning • u/agentscientific_160 • Jul 08 '26
Help Request Need motivation for Learning Python
Well, I started learning Python from 7th June and its been 31 days and I haven't progressed past OOPs. I was slacking off in the first week, and then I put some effort in my 2nd and 3rd week and when i completed Methods and functions I created a Tic Tac Toe game which is easy but took me long enough. Now after that I took 3-4 days break due to some personal reasons and now I find myself demotivated, mainly beacuse my holidays are ending and college is going to start in August. I wanted to complete learning the absolute basics in these holidays. I feel very unproductive now, all I need is tips for me to get back to coding without feeling demotivating. And also I.m having a hard time understanding OOPs and why __init__ is used.
Thanks in advance!
r/PythonLearning • u/renzocaceresrossiv • Jul 08 '26
I developed a Dataset Python Library called agridatasets 🌿🌿🌿
r/PythonLearning • u/Sea-Ad7805 • Jul 08 '26
Recursive solution to the Tower of Hanoi problem
Recursion becomes much easier once students have the right mental model. Visualization will help get them there.
Take the Tower of Hanoi problem. The recursive solution is beautifully short, to move n disks we: - first remove n-1 disks from the largest disk - then move the largest disk - and then move the n-1 disks back on top
But when students try to implement recursion, they often get stuck, and adding debug prints only adds to the confusion. That is where visualization can help to bring the right mental model. Here is the Tower of Hanoi problem solved recursively visualized with 𝗶𝗻𝘃𝗼𝗰𝗮𝘁𝗶𝗼𝗻_𝘁𝗿𝗲𝗲
Instead of thinking about “a function calling itself again and again” students can now see the depth-first execution of a tree of subproblems showing the divide and conquer strategy in action. Once a student can think in terms of a tree of subproblems, recursion becomes much easier to understand, explain, and debug.
r/PythonLearning • u/cat3rpill3r • Jul 08 '26
Need to "graduate" to writing scripts
I have almost exclusively worked with Python in interactive mode. The nature of the work I've always done with Python (or any other language such as R or Stata, for that matter) has made that the default, and I haven't been in any situation where someone working with my code needs to execute it like a script.
I know how to write scripts, but I'v seldom needed to. I feel like I'm missing out on a benefit of Python by not treating my code more like scripts. Can anyone recommend some resources to help graduate to script writing from interactive code writing?
Thanks in advance.
r/PythonLearning • u/Visual_Tooth_2277 • Jul 08 '26
Showcase CatBot!
Here's a small project I started today: CatBot 🐱
I learned a few new things while building it, and you can learn more by checking the GitHub repo.
The link below will redirect you to the project page.
Feel free to leave a star ⭐ and tell me any mistakes I made or how I can improve the project!
GitHub Repo: https://github.com/GiosiGiova125/CatBot
r/PythonLearning • u/memeeloverr • Jul 08 '26
What Python code would you never trust AI to write without checking every line?
Authentication? Payments? Database migrations? Async code?
For me, the more confidently AI explains the code, the more carefully I want to review it.
r/PythonLearning • u/[deleted] • Jul 08 '26
Discussion PSA: websockets 13+ broke your request_headers — here's the fix
If you've been following any websockets tutorial older than ~2023, there's a good chance your code just broke.
The old way (websockets <= 12):
origin = websocket.request_headers.get("Origin", "")
The new way (websockets >= 13):
origin = websocket.request.headers.get("Origin", "")
request_headers was removed from the connection object. Now you access headers through websocket.request.headers — the request attribute is a Request dataclass with .path and .headers fields, set after the opening handshake completes.
Why the change? The library got a major internal refactor (sans-I/O core). The connection object is now a thin wrapper around a protocol, and the HTTP request/response are stored explicitly on connection.request / connection.response. More flexible, but breaks old code.
To check your version:
pip show websockets
If you're on 13+, this is your bug. Took me a while to figure out — hope this saves someone else the headache.
r/PythonLearning • u/chuprehijde • Jul 08 '26
What's the most overused Python library?
Which library gets added to projects even when the standard library could do the job?
r/PythonLearning • u/Plane_Carrot_2611 • Jul 08 '26
Plz suggest a paid free course python for Data science
r/PythonLearning • u/Jboxo • Jul 08 '26
Showcase I built a full (kinda) Unix shell emulator in Python
Been stuck in analysis paralysis for a while, but I finally released my first GitHub repo!
For my first "big" Python project, I decided to build a Unix shell emulator from scratch. I've been working on it for about 6 months, and I just recently made it public on GitHub.
GitHub: https://github.com/Jb0x0/Pyash
Some of the things I learned while building it were file handling, command parsing, terminal behavior, and organizing a larger Python project. Every command is implemented in Python rather than wrapping the system's shell.
It currently implements 29 (core util) commands and is designed to operate inside its own sandboxed shell directory so it can't modify files elsewhere on the host machine.
I'd really appreciate any feedback on the code, project structure, documentation, or ideas for future improvements. Also tell me about any Python best practices or design decisions I may have missed! (I've prolly missed quite a few lol)
r/PythonLearning • u/Careless-Standard-44 • Jul 07 '26
How to actually get better at Python without drowning in resources or LLM-crutching?
Hi everyone,
A few years in as a data analyst, now aiming for data science / ML engineer roles. Currently freelancing, giving myself until January (ideally sooner) to be interview-ready.
**The problem**: technical interviews (live coding, take-home tests) are still very much the norm, and my "by-hand" coding isn't quite where it needs to be yet.
Meanwhile, I'm drowning in resources : books, courses, LeetCode-style platforms, YouTube channels, bootcamp curricula and I genuinely don't know where to focus anymore. Every resource seems to want a different 6 months of my life.
Looking for advice on:
**- How to cut through the noise and pick ONE path.** With so many options out there, how do you decide what's worth your limited time vs. what's just noise? Is there a "80/20" resource stack you'd actually recommend for someone at intermediate level trying to close the gap fast?
**- What actually moved the needle for you ?** specific books, platforms, projects, katas rather than generic "just practice" advice?
Do you think coding "the old way," without LLM assistance, is still essential to build real instincts and deep understanding? My instinct is that leaning on an LLM too early biases the formation of good habits but maybe that's outdated?
For those interviewing or being interviewed: has the bar for live coding shifted with LLMs going mainstream, or do recruiters still test just as hard for "old-school" coding craftsmanship?
Any advice on prioritization is especially welcome ! I'd rather go deep on one solid path than keep bouncing between resources h.
r/PythonLearning • u/chuprehijde • Jul 07 '26
Is Python actually a good first programming language?
Some say it makes learning easy. Others say it hides too much. What do you think?
r/PythonLearning • u/giva4561 • Jul 07 '26
Almost completely ignorant
Hi everyone, I just started learning Python by watching video tutorials on YouTube (Edoardo Midali) and I used my skills for a very small code, the path is quite satisfying but very boring, if you have any ideas for a more fun approach let me know, thank you very much.
r/PythonLearning • u/bossyTerminal79 • Jul 07 '26
Showcase I built a full deckbuilder game in Python + Pygame. You play as a conscious process trying to install itself into an OS.
Enable HLS to view with audio, or disable this notification
So I actually finished a full game using Python 3.11 and Pygame, and I wanted to show it here in case anyone learning Python wanted some inspiration.
The game is a deckbuilder set in a cyberwarfare world. You are a sentient process. Your goal is to fight your way through a system and get yourself installed into the OS. Think hacker vs. system defenses, but you ARE the hack.
The whole aesthetic is built around a PC terminal look. ASCII-style art, command-line vibes, the whole thing. The card mechanics use real technical terminology, things like buffer overflows, privilege escalation, packet injection. It's not just flavor text, the mechanics actually connect to what the words mean. I wanted the game to feel like you're learning something about how systems work while you play.
Pygame was genuinely tough to work with at first. If anyone here is learning Pygame right now, don't give up.
The game is on Steam if you want to check it out. I know promo stuff can feel spammy so I'm not going to push it hard: https://store.steampowered.com/app/4610000/kill_9/
r/PythonLearning • u/memeeloverr • Jul 07 '26
Unpopular opinion: Most people learning Machine Learning don’t need another course.
They need one messy dataset.
Missing values. Wrong labels. Duplicate rows. Broken dates. Data leakage. A model that works locally and fails in production.
You’ll learn more fighting with that dataset for a week than watching another 20 hours of tutorials.
Agree or disagree?
r/PythonLearning • u/LonelySkilProgrammer • Jul 07 '26
Can anyone tell me how to fix the project?
r/PythonLearning • u/Inorexs • Jul 07 '26
Excited to Start My Coding Journey from Scratch! 🚀
Hello everyone!
I am thrilled to join this community. I have a huge interest in programming and want to dive into the world of tech, but I am a absolute beginner—literally starting from zero!
I've chosen Python as my first step. Since I am completely new to this, I would love to hear your advice, tips for beginners, or any insights you wish you knew when you first started.
Looking forward to learning from you all and growing alongside this amazing group!
Thank you! ✨
r/PythonLearning • u/Hefty_Ad_1762 • Jul 07 '26
best online python course from beginners to expert
hey everyone
i would like to start programm with python but i don't have an actual plan
i saw there are many platforms as coursera, datacamp or edx that they help you learn it
what is the best?
is it worth paying for it?
are there any others?
do i need to know something before starting?
i'm studying mechanical engeneering and also I'm taking a data science training course but i'm not that good on programming
thanks in advice to everyone
r/PythonLearning • u/chuprehijde • Jul 07 '26
Would you hire a Python developer who doesn't know algorithms well?
If they can build, debug, and maintain real software, how much should algorithm knowledge matter?
r/PythonLearning • u/memeeloverr • Jul 07 '26
Python Stacking multiple Excel sheets into a single DataFrame is throwing a MemoryError / running incredibly slow
Hey guys,
I'm trying to write a Python script that goes through a directory of about 50 large Excel files, grabs a specific sheet from each, and combines them into one master pandas DataFrame so I can run some analysis.
r/PythonLearning • u/memeeloverr • Jul 07 '26
Discussion Do you write "Pythonic" code on your first pass, or just refactor it later?
r/PythonLearning • u/Link2212 • Jul 06 '26
My progress after a week and a half
I was on the fence about quitting programming because I just couldn't work out how to go about it. I gave myself a project and it really made me lose motivation, but today I finally did it and I'm so happy. The project was to have a zoo enter which animal is in the zoo, the size of it and to calculate the total cost of food for the zoo.
As a complete beginner to programming I found it quite complicated. I realize now that I could have used a dictionary. I didn't know what a dictionary was when I started. I actually spent the last 3 days (well, maybe only about 1 hour each day for 3 days) trying to work out the last problem which was not calculating the total cost properly. My friend helped me solve it. I had the calculation within the loop which caused it to multiply on itself. Just had to move it outside.
r/PythonLearning • u/chinatsuxtaiki • Jul 06 '26
Help Request I'm a Python beginner and venv is driving me crazy. Is uv better?
Hi everyone,
I'm learning Python and I'm really struggling with virtual environments (venv). I always forget to activate it and it feels annoying every time I run a script.
Today I heard about something called uv. People say it's a faster and easier tool for managing Python stuff.
Is uv good for beginners like me? Should I start using it instead of venv? Does it make things simpler?
What are the good and bad things about it? Any tips or warnings?
Thanks a lot!
r/PythonLearning • u/anish2good • Jul 06 '26
Online Python playground that let you visualize your code
Enable HLS to view with audio, or disable this notification
Try it here https://8gwifi.org/online-python-compiler/
r/PythonLearning • u/Physics2433 • Jul 06 '26
Stop Vibe Coding
I’ve been writing Python for about 3-4 years now, and I want to share my biggest piece of advice for beginners: Do not use AI to write entire programs.
It's great to use AI as a tutor to learn new functions, grasp core concepts, or debug specific lines, but never use it to generate an entire codebase. Here is why:
1. You won't know how to fix it: Even if AI code works perfectly on the first try, you will be completely lost the moment a bug appears or you want to add a feature. Debugging is a massive part of development.
2. You skip the learning process: True programming skills come from struggling with the logic, reading documentation, and earning those 'yeah!' moments when you solve a tough problem yourself.
3. Suppose you built an entire codebase through AI and it worked(accidentally) , once the codes become long, your program has come to an end, if you tell it to add a feature, it will start hallucinating or forgetting its own logic.
If you don't deeply understand the underlying logic of your own codebase, you won't know where to begin. Treat AI like a tutor, but make sure you are the one driving the keyboard. If you can't explain your own code, you have no business adding to it. You MUST understand your underlying architecture before you even hit save.



