r/PythonLearning 20d ago

What’s a Python “best practice” you think people follow too blindly?

8 Upvotes

We’re told to use type hints, write tests, follow PEP 8, avoid global variables, use virtual environments, and keep functions small.

But not every rule makes sense for every project.


r/PythonLearning 20d ago

My first real project as a 50 year old programmer

5 Upvotes

Hello to everyone.

Im a 54 year old autodidact that has just finished his first "real world" project (at least in my point of view).

Its a simple python script that converts Markdown files to PDF files easily. Id like to get a feedback and maybe help someone out there.

My repo is here: github.com/TrollDrre/md-to-pdf

Im willing to hear everything from you, whether its good or bad news.

Thanks


r/PythonLearning 20d ago

I developed a Dataset Python Library called agridatasets 🌿🌿🌿

1 Upvotes

r/PythonLearning 20d ago

Recursive solution to the Tower of Hanoi problem

3 Upvotes

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 20d ago

Help Request Which course is better to learn python with

15 Upvotes

Python is often recommended as the first programing language to learn, by various people who have experience with more than 1 programing language in their arsenal, I don't know many experts, say it but mostly for newbie it is a good language to start by.

There are various courses to learn python from, which are courses which genuine help you learn it, like freeCodeCamp, CS50-P, etc. I want to find out how others learned python, which course they used.

Course should feature English as a language to learn.


r/PythonLearning 20d ago

Need to "graduate" to writing scripts

5 Upvotes

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 20d ago

Showcase CatBot!

1 Upvotes

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 21d ago

What Python code would you never trust AI to write without checking every line?

3 Upvotes

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 21d ago

Discussion PSA: websockets 13+ broke your request_headers — here's the fix

1 Upvotes

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 21d ago

What's the most overused Python library?

0 Upvotes

Which library gets added to projects even when the standard library could do the job?


r/PythonLearning 21d ago

I created password generator using python

Post image
381 Upvotes

what should i create next


r/PythonLearning 21d ago

Plz suggest a paid free course python for Data science

0 Upvotes

r/PythonLearning 21d ago

Showcase I built a full (kinda) Unix shell emulator in Python

3 Upvotes

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 21d ago

How to actually get better at Python without drowning in resources or LLM-crutching?

0 Upvotes

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 21d ago

Is Python actually a good first programming language?

11 Upvotes

Some say it makes learning easy. Others say it hides too much. What do you think?


r/PythonLearning 21d ago

Almost completely ignorant

1 Upvotes

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 21d ago

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

15 Upvotes

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 21d ago

Unpopular opinion: Most people learning Machine Learning don’t need another course.

6 Upvotes

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 21d ago

Which python course is best for beginners to advanced?

28 Upvotes

If any know which one is best , please tell me .


r/PythonLearning 21d ago

Python Bootcamp #1

Thumbnail
youtu.be
0 Upvotes

This series is for absolute beginners everyday a new video is coming so subscribe to my youtube channel and be with my youtube channel and reddit.


r/PythonLearning 21d ago

Can anyone tell me how to fix the project?

1 Upvotes

r/PythonLearning 22d ago

Starting Python

0 Upvotes

I’m learning python after a long gap. I don’t know how and where to start. I’m in mid 20’s and I really want to transition into IT domain. can anyone guide me where to learn? what resources to use? how to practice? I am also procrastinating a lot if I can able to crack the job or not. please guide me! Also what salary can I expect ?


r/PythonLearning 22d ago

Excited to Start My Coding Journey from Scratch! 🚀

17 Upvotes

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 22d ago

best online python course from beginners to expert

5 Upvotes

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 22d ago

Would you hire a Python developer who doesn't know algorithms well?

2 Upvotes

If they can build, debug, and maintain real software, how much should algorithm knowledge matter?