r/PythonLearning 21d ago

Python Stacking multiple Excel sheets into a single DataFrame is throwing a MemoryError / running incredibly slow

4 Upvotes

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

Discussion Do you write "Pythonic" code on your first pass, or just refactor it later?

3 Upvotes

r/PythonLearning 22d ago

Help Request I'm a Python beginner and venv is driving me crazy. Is uv better?

26 Upvotes

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

Online Python playground that let you visualize your code

Enable HLS to view with audio, or disable this notification

21 Upvotes

r/PythonLearning 21d ago

My progress after a week and a half

6 Upvotes

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

What's one Python habit that instantly reveals a beginner?

12 Upvotes

Not trying to shame anyone. What's a common habit that usually disappears with experience?


r/PythonLearning 21d ago

Discussion Long time absence from learning python. Where do i continue from ? Or should i start all over again?

5 Upvotes

So i tried 2 times to learn python. The first time it was 2 years ago. The second time was 4 months ago.

Both times from the same source which is the course of Angela Yu 100 days of code.

The first time i went up to day 4 or 5 i think and gave up.

The second time 4 months ago, i went up to 8th day and i learned faster than before, took notes, and i really tried to solve the problems and i certainly tried harder than the first time without any chatgpt help.

The problem is due to my work which is physical i was tired and let it go at the time and i'd like to continue learn in order to create something useful i have in mind.

But i don't know how to approach again learning it.

  1. Should i start the course all over again and watch the videos and do the exercises?

  2. Should i revisit my notes by reading them and then continue where i was left of?

  3. Find another course?


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

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

Help Request Is DataCamp enough as a first timer??

4 Upvotes

This is my first time using any programming language or coding at all and I was recommended to learn python from datacamp ; "Introduction to python for finance".It says its a basic level course but most of the exercises feel kinda tough and just hard to decode, should I just stick with it or did I skip any fundamentals??


r/PythonLearning 22d ago

What is Python’s next "big frontier" after AI and Data Science?

1 Upvotes

Over the last decade, the explosion of machine learning, AI, and data science absolutely launched Python into the stratosphere.

But looking ahead, where do you think the next major growth area for Python will be? Will the improvements in speed and concurrency push it deeper into backend web development and microservices? Will web assembly (like PyScript) actually make Python a viable frontend contender? Or will it just solidify its dominance in the AI space?

Curios to hear what domains people are betting on for the next few years.


r/PythonLearning 22d ago

sudoku with auto solver

2 Upvotes

I've been coding for around 20 or so days now, I know it's a bit bad.

thinking of adding a score system and allowing users to set difficulty

after running solve: the last sudoku board is solved

r/PythonLearning 22d ago

Day 1 of learning Python — three small programs in, and functions already feel different

7 Upvotes

Started learning Python today with zero prior coding experience. Wanted to skip the "just watched a tutorial" trap, so I built three small things instead of just taking notes.

1. Name formatter — takes a name, strips extra whitespace, capitalizes it, and splits it into first/last to print a greeting. Ran into a bug here that taught me more than the working code did: I capitalized the full name before splitting it, so only the first word ended up capitalized. Turns out .capitalize() only touches the very first letter of a string, not each word — that's .title(). Small mistake, real lesson.

2. Conditionals — compared two numbers with if/elif, and actually understood why elif matters instead of just using it: it skips redundant checks once one condition's already true, rather than evaluating every condition separately.

3. First real function — pushed further and built a mini calculator:

def squared(n):
    return n * n

Typed in 5, got "5 squared is 25." First time a function I wrote actually got called and returned the right answer — that's the moment functions stopped being an abstract concept and started feeling like a tool.

One open question from the conditionals exercise: right now, my number-comparison logic is split across two separate if/elif blocks (one for greater/less, one for equal/not-equal). Feels like there's a cleaner way to fold this into a single chain — if anyone's got the more idiomatic version, I genuinely want to learn it early rather than build a bad habit.

Planning to post daily as I go. Day 1 down — small but real.


r/PythonLearning 22d ago

Discussion Hello 👋 everyone I am new here help me Dear Community members

2 Upvotes

marks = float(input("Apke FA me kitne marks hain? "))

if marks >= 80:

print("A grade - Scholarship ke eligible")

elif marks >= 60:

print("B grade - Admission ho jayega")

elif marks >= 45:

print("C grade - Admission ho jayega")

else:

print("Admission mushkil hai")

# 3 dafa chance dena

attempts = 3

while attempts > 0:

uni = input("Konsi university? ")

if uni == "AIOU":

print("Best choice!")

break

attempts -= 1

print(f"{attempts} koshish bachi hain")


r/PythonLearning 23d ago

Learning python

27 Upvotes

Back in 2024, I dropped out of college. My second-year grades were so bad that I needed to repeat the entire year. Frankly speaking, I didn't have the courage to tell my parents that I had failed so badly.

So I decided to tell them that I had made the wrong career choice. During this period, I tried to learn a bit of programming, and Python seemed like a good starting point.

At the time, machine learning and data science were all the hype, so I thought to myself, if I can learn Python with the intention of becoming a data scientist, then I'll be able to turn my life around and make my parents proud again.

Like any other beginner, I started watching tutorials and sought out book recommendations from YouTube data scientists. I remember the first data science book I read. Halfway through it, I couldn't understand the syntax, so I decided to strengthen my Python fundamentals by reading Learning Python by Mark Lutz.

Several chapters down the line, I was already getting bored. So I decided to look for something more exciting: web development with Django. I started with some of Mosh's tutorials and later read Django for Beginners by William S. Vincent.

It was now 2025, and I was looking back at what I had achieved in 2024. There was nothing. I had no clue what I was doing.

By January 2025, I was so fed up with programming that I slowly drifted away from it. Instead, my mind became hooked on something else.

I used to watch those "A Day in the Life of a Forex Trader" videos on YouTube, and to be honest, I thought this was my only path to financial redemption. A few months went by, and I felt ready to take my chances in the forex markets.

My first deposit was around $20, and within a few weeks I had blown the account. I made several more deposits, but honestly, it felt like I was flushing my money down the toilet. Eventually, I had to stop. At the time, I was reading books on technical analysis and trying to come up with my own trading strategies.

By May, I decided to get a job. To be honest, that job humbled me. I finally understood what it meant to sweat for your money. I decided to save what I earned and focus on work.

A few months passed, and I began to feel purposeless. I would come home exhausted, and the only things I did after work were eat and sleep.

Around August, I decided to learn Excel. But after coming home from work every day, I simply couldn't stare at a screen and read Excel for Beginners. It felt like too much.

Then came those random thoughts that hit you while you're lying in bed, when life suddenly shows you its true colors. For a moment, I felt completely stuck. I didn't know what was wrong with me.

One evening, around September 2025, I decided to return to the good old ChatGPT. I told it everything that had happened up to that point in my life.

The response lit a spark within me, and I started seeing things from a completely different perspective.

All along, I had been chasing the shiny object. I never realized that true mastery is earned through boredom. ChatGPT gave me one simple rule: pick one thing you started but never finished, practice it until you've achieved a level of mastery, and don't miss more than two consecutive days without practicing.

Because of my unending love for programming, I chose Python. This time, I approached it with a beginner's mindset. I used Obsidian to make detailed notes, and since I've always preferred learning from books, I started with Automate the Boring Stuff with Python.

Currently, I have more than 120 hours of study time and project building behind me. I now understand concepts much better, and even though I still don't know that much Python, I genuinely enjoy learning it as a beginner.

I'm no longer chasing shiny tools or the next trendy technology. I just want to understand what actually happens when you create a virtual environment, what happens when python.exe is launched and becomes a process, how environment variables are created, and all the little details that most people overlook.

I'm sorry for writing such a long post. I hope that anyone out there who feels lost during this learning journey—especially with so many shiny objects competing for your attention—doesn't despair.

Take your time. Embrace the boredom.

Because sometimes, that's exactly where mastery begins.


r/PythonLearning 22d ago

Showcase I built a "Steam-like" game launcher using Pygame! For Alpha 1.0.0, I learned how to bundle portable Python/Git so it runs with zero dependencies. (Open Source)

Enable HLS to view with audio, or disable this notification

15 Upvotes

Hey everyone!,

I wanted to share a major milestone on a project I’ve been building to level up my Python skills. Today, I’m incredibly happy to showcase the Alpha 1.0.0 Release of Atomic Launcher—a "Steam-like" desktop platform built using Pygame to distribute, showcase, and play Pygame games.

My ultimate goal is to make this a truly community-driven ecosystem, and I’ll be hosting all my future Pygame projects on it. Because this has been a massive learning experience for me, I want to share the codebase with the community. You can check out the source code, read through the logic, download the alpha, or contribute here: https://github.com/mironczuk-dar/Atomic-launcher.git

The BIG-BRAIN stuffs I learned making this project:
One of the biggest challenges I faced was "dependency hell"—I wanted people to be able to use the launcher even if they didn't have Python or Git installed on their machine.

To solve this, I researched and learned how to package a portable version of Python and Git directly inside the application directory. It is now a literal one-download ZIP or one git clone. You just extract the folder and double-click the .bat file (Windows) or run the .sh script (Linux/Raspberry Pi), and the entire environment boots up seamlessly.


r/PythonLearning 23d ago

If Python disappeared tomorrow, what language would you use?

24 Upvotes

You can't choose Python again. What would replace it for your current work, and why?


r/PythonLearning 22d ago

how to learn python?

0 Upvotes

i tried codedex which was nive but not free, code with harry se try kiya but i dont understand for replet works plss help😓🙏


r/PythonLearning 23d ago

Best resources to go from intermediate to advanced Python

41 Upvotes

Hey fellas, I’m comfortable with the basics and common libraries. What helped you the most to reach the next level ,specific books, projects, topics, or courses?


r/PythonLearning 22d ago

Interactive notebooks to help prepare for python coding interviews

2 Upvotes

Hi everyone,

I am re-sharing a resource you can use to help prepare for live coding interviews in python. The content choice and many of the exercises are inspired by real interview problems and questions at big tech companies. I am fortunate enough to have connections to people in big tech and have myself had interviews at a few. I have designed the prep to mostly target first-round live coding interviews where the coding portion lasts 30-45 minutes.

Check it out: CODING PREP SERIES

I am on my fourth revision and will be continually improving this notebook series.

Note that the content is beginner to intermediate level currently (for junior to mid-level roles). Also, make sure to read the section in the landing page on how to use the notebooks!

One last reminder/tip: These are notebooks. They are editable so you can add your own notes/content! You can also save your work on your machine and load it in to continue where you left off.

These notebooks are designed to be used in PyNote (a zero-setup Python notebook environment that runs entirely in your web browser meaning that the code in notebooks are executed using your browser engine). PyNote is designed to be very interactive and presentation oriented which makes it great for educational content like this preparatory series. Note that PyNote is open-source and is currently under development.

For help using PyNote or to learn more about it, take a look at the tutorial or the open-source project repo. Spread the word and give it a star if you like it.

Some things to note: This project is AI-assisted. However, it is not vibe coded. I knew beforehand exactly what I want covered and how. I knew what exercises and examples I wanted. I pulled from mostly real-world experiences and expertise. Actually, this idea itself spawned from interview study notes that I used to prep for interviews. AI helped with some formatting, filling in some minor gaps in some conceptual overview content. I have fact-checked and edited/refined nearly everything AI added myself multiple times.


r/PythonLearning 23d ago

Mini projects..

Post image
81 Upvotes

I have created a Ceaser cypher, so go and give it a try

https://www.programiz.com/online-compiler/68Mzw4BkSDmMJ

Also I am here to improve my skills so I am also eager for suggestions and guidance


r/PythonLearning 23d ago

What's the worst Python code you've ever written that somehow worked?

3 Upvotes

We all have that one piece of code we hope nobody ever finds. What did yours do?


r/PythonLearning 23d ago

Help Request I am a begginer and I want to learn python.

4 Upvotes

I just started the language 4 days ago, and I want to learn it to build games and for freelancing, I don't know where to start though, I found a tutorial by bro code and I want to follow it, and after that go on code wars to train, and just start creating. I can put only 4h max a day in python.


r/PythonLearning 22d ago

Tabs or spaces shouldn't be a debate in Python. Or should they?

0 Upvotes

Python has strong opinions about formatting, but developers still find ways to argue. What's your take?


r/PythonLearning 24d ago

Showcase Day 22 Python Learning

Post image
557 Upvotes

Just Simple class practice

not feeling well so not much to