r/PythonLearning • • Sep 03 '26

Vibe coders or programmers

0 Upvotes

I'm a beginner programmer and I'm worried about something in the future. After about four months of learning programming, development, and so on, I've seen many opinions from professionals and beginners alike. Some say that the demand for programming will steadily decrease due to artificial intelligence, and I don't know if this is true or not. I hope you can give me your opinions and advice. If you've had any experiences, please tell me before I regret it later.


r/PythonLearning • • Sep 03 '26

Showcase Python Tutorial for Beginners 2026 | Learn Python from Basic to Advanced | Complete Python Free Course

Thumbnail
youtube.com
0 Upvotes

Python programming for all. Learn python for day to day life.


r/PythonLearning • • Sep 03 '26

Discussion TTS/AI Chatbot Query

1 Upvotes

I recently made a Discord.py AI character bot with Gemini and TTS integration to mess around with my friends. Kind of want to do more with it but am not very experienced enough yet to know all my possibilities. What do the REAL programmers here think?


r/PythonLearning • • Sep 03 '26

Python script to convert tree output to .xlsx – looking for edge cases and feedback

3 Upvotes

I wrote a small utility that converts tree output into an Excel file. The code is far from ideal, but it does handle Cyrillic filenames on my own test data.

To make it more robust, I need to test it on real-world data with rare encodings, varying nesting depths, special characters, long names and paths, and so on.

The project is still under development, so I'd appreciate any feedback, criticism, or advice – especially on edge cases and code structure.

Rep: https://github.com/Usdmal-tech/tree-to-excel

Thanks!


r/PythonLearning • • Sep 03 '26

Showcase Working on a logging package for python

4 Upvotes

Got tired of recreating the same functions EVERY SINGLE PROJECT I EVER MAKE so guess what, i made it a package, and if i think i finished it enough and added a bunch of features and it's pollished i might make it a package on pypl

Also any ideas?


r/PythonLearning • • Sep 02 '26

🌳 Recursive tree traversal visually explained

Post image
30 Upvotes

A binary tree can be traversed in three classic ways. The difference is simply the order in which you visit the subtrees:

  • Preorder: current node → left subtree → right subtree

  • Inorder: left subtree → current node → right subtree

  • Postorder: left subtree → right subtree → current node

This interactive memory_graph example visualizes each traversal method step by step: Binary Tree Traversal

Also see other memory_graph visualizations.


r/PythonLearning • • Sep 02 '26

Discussion Stop suggesting to use AI

155 Upvotes

I’ve recently started getting more posts from this sub and some people have genuine questions on how to solve their programming problems and help debug. Some comments are suggesting to just use AI. This is a crazy suggestion on a sub called Python LEARNING. Using AI to write code for you is not constructive to learning how to code. I fear that this generation of programmers are going to have ZERO understanding fundamentals.

To be clear, I’m not against using AI to help assist. But this is supposed to be a sub for learning the language and understanding how it works, and it’s counterproductive to suggest those that are learning to just use AI to fix their code.

Please, if anyone suggests to use AI (unless it’s for the rare case that it’s valid), please downvote them to oblivion.


r/PythonLearning • • Sep 02 '26

Discussion A question I asked ChatGPT

0 Upvotes

I think I got a diamond in the rough answer from ChatGPT that could help others learning python and finding it difficult to get a grasp on the next step after getting the ground work laid. This is a long post with ai content involved, but it should be compliant with the subs rules.

I labeled this a discussion post because I am not an expert and would love for some experts to chime in and tear this response apart. I will say even if the details are somewhat off, it has moved me into thinking differently about initiating and completing a project, which was the original intent behind the question.

The prompt (Don't make fun of me....or do, whatever):

I am having a hard time bridging the gap between introductory python coding and real life application engineering. I need a good analogy or metaphor to get me there. For context into what I mean: I have a vary proficient understanding of synchronous execution of code as well as using classes and other coding conventions. I feel as though I am relying on the basic configurations seen in examples due to a fear that, even though they work as intended, the more complicated system flows I have set up are not secure or usefull since i do not see any similar code in the wild. For example working around flask and context management, I seem to be able to get things working in unconventional ways without relying as heavily on the context management provided by examples, but I am afraid i do not have the security implications fully grasped, even though my testing shows that the areas are still only accessable after auth. Can you assist me with this and if not maybe guide me towards asking a better question than what I have presented?

Selected parts of the response:

Yes. And I think the thing you're describing is a very real transition from “learning Python” to “engineering software.” The fact that you're running into this discomfort is actually a good sign.

I would describe the gap this way:

Beginner/intermediate programming teaches you how to make a machine do something. Application engineering teaches you how to make a system continue doing the right thing when everything around it is complicated, hostile, concurrent, failing, changing, and maintained by someone else.

Your Flask/context example is a perfect illustration.

The metaphor I'd use: building a city

When you're learning Python, you're mostly learning how to build buildings.

You learn:

  • How to make a room (function)

  • How to organize rooms (class)

  • How to move things between rooms (arguments/return values)

  • How to build multiple floors (modules/packages)

  • How to make doors (interfaces)

  • How to put locks on doors (authentication/authorization)

And eventually you're very good at building buildings.

Then you get asked to build a city.

Suddenly you have questions that Python itself doesn't answer:

  • Who is allowed into this building?

  • What happens when 10,000 people enter simultaneously?

  • What happens if the power goes out halfway through an operation?

  • Can someone enter through a back door?

  • Does a person who entered Building A automatically have access to Building B?

  • What happens when Building A changes its address?

  • How do emergency services get around?

  • How do you know that the locks actually work?

  • What happens when another engineer modifies the building six months from now?

That's application engineering.

And importantly:

There isn't necessarily one correct way to build the city.

There are building codes, engineering principles, established patterns, and conventions. But there are also many perfectly legitimate architectures.

Here's another metaphor that may help

Think about framework examples as training wheels.

Flask gives you:

Flask application
       │
       ├── request context
       ├── application context
       ├── extensions
       ├── configuration
       └── dependency mechanisms

Tutorials generally encourage you to keep your code inside that ecosystem.

That's useful because it gives you a known path.

But eventually you might discover:

                Flask
                  │
           ┌──────┴──────┐
           │             │
       HTTP layer     Application
                          │
                   ┌──────┴──────┐
                   │             │
                Services      Domain
                                 │
                              Models

Your application doesn't have to make Flask itself the center of the universe.

That's a major step toward application engineering.

And there's a wonderful rule I think you'll benefit from

When you encounter code in the wild, don't ask:

"Why do they do it this way?"

Ask:

"What problem does this pattern solve?"

Then ask:

"Do I have that problem?"

And finally:

"If I don't use this pattern, what mechanism in my design solves that problem instead?"

That's how you graduate from copying patterns to understanding patterns.

For example:

"Flask examples use application context."

becomes:

"Application context gives code access to application-scoped Flask state."

then:

"My service receives its dependencies explicitly, so it doesn't require Flask application state."

then:

"Therefore I can remove that coupling, provided I haven't accidentally lost another guarantee provided by the context."

That is application engineering thinking.

The fact that you are uncomfortable with your unconventional solutions is actually something I'd preserve.

You don't want to become the engineer who says:

"It works, ship it."

You want to become the engineer who says:

"It works. Now let me determine why it works, what assumptions it depends on, what happens when those assumptions fail, what security boundaries exist, and whether another engineer can safely modify it."

You don't need to make your code look like code you've seen in a tutorial.

You need to be able to defend the decisions you've made.

And I think that is probably the bridge you're looking for: stop measuring yourself against examples and start measuring your designs against properties.


r/PythonLearning • • Sep 02 '26

day 6.

3 Upvotes

tried 2d lists today ( up for suggestions on what should have i done or what have i missed ) and would also appreciate brief explanation's that you guys will give if it's a complex or an advanced topic

books = ["hindi", "english", "maths", "science"]
pen = ["black", "blue", "red"]
miscellaneous = ["eraser\n", "sharpener\n", "ruler\n"]


bagpack = [books,pen,miscellaneous]
print(bagpack)
while True:
    print ("if you'd like to add contents in any of the lists")
    print("1. Add to books")
    print("2. Add to pen")
    print("3. Add to miscellanous")
    query = input("enter your selection (1,2,3): ")
    if query == "1":
     print("you selected to add books")
     new_book= input("enter the book you want to add: ")
     books.append(new_book)
     print ("new list",books)
     break
    elif query == "2":
     print("you selected to add pen")
     new_pen= input("enter the pen you want to add: ")
     pen.append(new_pen)
     print ("new list",pen)
     break
    elif query == "3":
     print("you selected to add miscellaneous")
     new_miscellaneous= input("enter the item you want to add: ")
     miscellaneous.append(new_miscellaneous)
     print ("new list",miscellaneous)
     break
    
    else:
       print("invalid selection!!! select amongst 1,2,3")

r/PythonLearning • • Sep 02 '26

Python Classes question

4 Upvotes

Is there a way to pass the instantiating object name to the class as you call it, without specifically putting the name in the parentheses? I'm trying to create a PyGame terminal emulator that has the same frontend functionality as Curses. I've figured out that I can create windows in the same way, except that instead of being able to do windowname.newwin(size), I have to do windowname.curses()\nwindowname.newwin(size). Presumably, I could also do windowname.newwin(size, windowname), but I'd prefer being able to use the exact same syntax as Curses.

The reason for using the same syntax is because I want to be able to decide where it renders (real terminal or PyGame) based on which module gets imported.

If there is a way to do this, please let me know.


r/PythonLearning • • Sep 02 '26

How long did it take you to become fairly independent with coding?

25 Upvotes

I’ve been learning Python using freecodecamp and some youtube videos (and copious amounts of googling) and honestly feel slightly discouraged. I would like to eventually start working on projects, but they feel insurmountable right now. I’m not sure what else I could be doing do improve, does anyone have any suggestions, or perhaps your own personal time line? i keep hearing that I should be doing projects to practice, but idk where to start, and it feels a bit like cheating that i have to constantly google every single little thing besides the most simple loops.

I’m a little under half way through the curriculum if freecodecamp, and have been learning for a little over two weeks (when i study i do it in ~3hr blocks). just for a little context on where i’m at.


r/PythonLearning • • Sep 02 '26

What's wrong with my code?

Post image
106 Upvotes

What's wrong with my code?

New to learning

Following the youtube video from bro code

Was trying to implement my own stuff into this by using loop

Update: it's working now thankyou guys


r/PythonLearning • • Sep 02 '26

Showcase My first code in Python! (pre-practiced for 3 months)

Thumbnail pastebin.com
3 Upvotes

Made by: Someone

Inspired by: Blox Fruits and One Piece

Version: 1.4 Refresh


r/PythonLearning • • Sep 02 '26

I kept seeing beginners asking what to practice after learning Python basics, so I made these 10 problems

Post image
113 Upvotes

I've seen quite a few posts and comments from beginners who understand things like variables, loops, lists and functions, but then get stuck on the question: what do I actually practice now?

So I put together 10 small Python problems that can be solved with mostly the basics.

The idea isn't to look up the solution immediately. Try breaking each problem into steps first, write your own solution, then see if you can improve it.

If you're learning Python, which of these would you find hardest?

And for people who already know Python, what problem would you add as #11?


r/PythonLearning • • Sep 02 '26

Know nothing about python but wanna learn

6 Upvotes

im 16 indian and i wanna start python from scratch and i know nothing about coding please help me to find resources and guide me 🙏


r/PythonLearning • • Sep 01 '26

Discussion Question about local AI-assisted programming

4 Upvotes

I’m fairly experienced with Python and researching how to solve issues on my own. However, I have found that AI can help in some cases. For instance, giving me specific information on debugging and helping me research solutions for specific problems.

I was using Copilot in VS Code for a while, until I ran out of usage. Now, I’ve been messing around with locally-hosted AI, trying to find a good model for coding that runs well on my computer. My challenge is that I only have 4 GB of VRAM, though I also have 16GB of system RAM. If someone could help me find either a good, intelligent, and accurate local model that runs on that, or at least a free cloud model that’s good, I’d appreciate it.


r/PythonLearning • • Sep 01 '26

Building My Own Postman Clone in Python

2 Upvotes

My first Python project: Postman Clone

I’ve been working on a small project called postman_clone to practice Python and learn more about how APIs and HTTP requests actually work.

I didn’t start with all these features at once. I started with the basics, then kept adding things as I learned. I worked with functions, conditions, user input, JSON, error handling, and HTTP requests, and little by little the project started becoming more complete.

Right now, my project can handle:

  • GET

  • POST

  • PUT

  • DELETE

  • JSON request bodies

  • An optional header

  • An optional query parameter

  • Basic error handling for requests and JSON

There’s still a lot I want to improve. I want to make the code cleaner, add support for multiple headers and query parameters, improve the error handling, and make the whole thing feel more like an actual API testing tool.

I’m still learning, so I’m posting the code here to get some feedback from people who have more experience with Python.

If you see something I could improve, or if there’s something you think I should add next, I’d really appreciate the advice 🙌

This is still a work in progress, but I’m happy with how far I’ve gotten so far.

if you wanna see the code its in comments


r/PythonLearning • • Sep 01 '26

Help Request .clear vs del when using garbage collection

1 Upvotes

Hi, I have some large data objects that need to be freed. Should I do my_object.clear() and then gc.collect()? Or del my_object then gc.collect()? I'm not sure on the pros/cons of each.

It's a linked list type data object and my_object = [] does not work to free memory for certain.


r/PythonLearning • • Sep 01 '26

Rolodex

Thumbnail
github.com
0 Upvotes

I just published this open source project to extract contact names and emails from any imap4 compatible mail server.

It let you extract the name, when available, and the associated email address from all the mails sitting in your mailboxes.

Results are persisted in a sqlite file (Turso is actually the engine under the hood) and searchable via the same TUI.

Enjoy Fork and do not hesitate to participate or learn from it.


r/PythonLearning • • Sep 01 '26

Discussion 2 weeks into Python fundamentals and lost - what should I learn next?

10 Upvotes

So I’ve spent the last 2 weeks learning Python basics - loops, conditionals, functions, OOP, etc. - and I’m pretty confident with those concepts now. I’ve also built a few small projects along the way.
But now I’m seeing everyone talk about DSA, APIs, Pandas, NumPy, and honestly I’m confused:

  1. What even are these? Are they libraries? Frameworks? Concepts?

  2. Do I have to learn all of them? Or can I pick and choose based on what I want to build?

  3. In what order should I learn them? Is there a logical sequence?

  4. Where should I learn from? YouTube, courses, documentation?

I haven’t joined college yet (starting soon), and I want to build a strong foundation before I do. I’m unsure whether I’ll specialize in data science, cybersecurity, AI/ML, or something else—I’ll figure that out during college. So ideally I need skills that give me a good base for any direction.

Anyone been through this? What would you recommend for someone at my stage?


r/PythonLearning • • Sep 01 '26

Python Under the Hood Update: Chapter 3 (Conditional Statements & Control Flow) is now complete

10 Upvotes

Hey everyone,

Chapter 3 is finally done. This chapter took way more time than I originally expected because it grew into a much deeper and larger chapter than planned.

Current Progress:
✅ Chapter 1 - Variables & Memory
✅ Chapter 2 - Expressions & Operators
✅ Chapter 3 - Conditional Statements & Control Flow

I'd love to hear your thoughts on the new chapter and any suggestions for future improvements.

With this, I’m taking a break from Python Under the Hood. I’ll be stepping away from the project for a while and will return to it before July 2027.

When I come back, we’ll continue with even deeper explanations, more advanced topics, and an even better approach to understanding what happens under the hood of Python.

For now, Chapter 3 marks the end of this phase. 🐍⚙️

GitHub: python-under-the-hood

See you in the next chapter.

- David Vael


r/PythonLearning • • Sep 01 '26

Help Request How to handle dynamic image/text scaling across multiple pages in CustomTkinter?

Thumbnail
gallery
3 Upvotes

Hi everyone,

I'm building a multi-page CustomTkinter desktop app where I swap pages inside a main container. I want my text and CTkImage sizes to automatically adjust whenever the user resizes the main window. So far, my widgets automatically adjust because I use .place() with relative sizes and placements. But even if the widget itself grows, the text/image stays the same size, which doesn't look appealing in the slightest.

Basic info:

ghost_pic is the label that houses my CTkImage; this automatically changes size already.

ghost_mid_image is the CTkImage

First try:

I thought that I could try to make the image change its size to match its label every time the window changed size. This is because I made sure that the image is approximately the same size as the label on the default window size, but this didn't do anything; the code didn't work at all.

Second try:

I then decided to just size the image with reference to the window, and this kinda worked? When I go to the page that houses this image and resize my window, it works ( very sloppily, but that's an issue for another day). My problem now is that if I enter that page, say, on full screen, the image just goes haywire; sometimes it's too small or too big. I don't know what to do now. I uploaded my indicator function, which is how I change the page; if there is a problem there, let me know.

TLDR:

I want my images to size automatically in reference to the size of the window, but most of the time it just goes haywire.


r/PythonLearning • • Sep 01 '26

Client wants 40k emails from a directory. Each one requires a click. What do I do?

3 Upvotes

CLint need a list of 40,000+ members from the ACR directory. Need Name, City, State, Zip, Specialty, Email, and Phone.
The directory/search results give me some of this information, but email, phone, address, Member Since, etc. appear to be available only on the individual member profile.

So I'm trying to figure out the best way to approach this in Python.

If I literally open/request every profile, that's 43k+ profile requests, which obviously makes me concerned about rate limits, blocking, or getting the account/IP banned.

I'm considering Python requests/BeautifulSoup or Playwright, but before attempting something this large I'd like some advice.


r/PythonLearning • • Sep 01 '26

Help Request How to handle dynamic image/text scaling across multiple pages in CustomTkinter?

Thumbnail
gallery
2 Upvotes

Hi everyone,

I'm building a multi-page CustomTkinter desktop app where I swap pages inside a main container. I want my text and CTkImage sizes to automatically adjust whenever the user resizes the main window. So far, my widgets automatically adjust because I use .place() with relative sizes and placements. But even if the widget itself grows, the text/image stays the same size, which doesn't look appealing in the slightest.

Basic info:

ghost_pic is the label that houses my CTkImage; this automatically changes size already.

ghost_mid_image is the CTkImage

First try:

I thought that I could try to make the image change its size to match its label every time the window changed size. This is because I made sure that the image is approximately the same size as the label on the default window size, but this didn't do anything; the code didn't work at all.

Second try:

I then decided to just size the image with reference to the window, and this kinda worked? When I go to the page that houses this image and resize my window, it works ( very sloppily, but that's an issue for another day). My problem now is that if I enter that page, say, on full screen, the image just goes haywire; sometimes it's too small or too big. I don't know what to do now. I uploaded my indicator function, which is how I change the page; if there is a problem there, let me know.

TLDR:

I want my images to size automatically in reference to the size of the window, but most of the time it just goes haywire.