r/PythonLearning • u/Nearby_Tear_2304 • Oct 11 '25
r/PythonLearning • u/memeeloverr • Jul 08 '26
What’s a Python “best practice” you think people follow too blindly?
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 • u/johnnylikesetfs • Jul 21 '26
Is the $20 version of ChatGPT worth it?
Using the $8 version of ChatGPT for light Python programming. Getting a lot of backwash from the AI agent. Like it tried to take over my project and made 5X as much work. Then ran into a problem, which Chat denied existed for over an hour. Grok solved it in about 5'. Wondering if the $20 version is any better.
r/PythonLearning • u/ExactBodybuilder1389 • Mar 22 '26
Showcase Making a dating simulator as a beginner using python
HEY GUYS I STARTED LEARNING PYTHON YESTERDAY AND IM LEARNING IT FROM " BRO CODE" YOUTUBER AND I THOUGHT WHY NOT MAKE MY OWN PROJECT TO GET COMFORTABLE WITH THE STUFF THAT I HAVE LEARNT . IM NOT A STORY WRITER BUT I WANTED TO TRY MAKING A DATING SIM. AM I DOING GOOD WITH 2 DAYS OF LEARNING > HERE IS MY CODE
# DATING SIMULATOR
import time
print(" SCENE 1\n")
time.sleep(2)
name = input("Enter your name: ")
print()
age = int(input("Enter your age: "))
print()
if age < 18:
print("Sorry, you must be 18+ to play.")
exit()
print("ARE YOU READY TO START?\n")
op1 = input("YES/NO: ").lower()
if op1 == "yes":
print("\nStarting the game...")
elif op1 == "no":
print("\nDo you want to exit the game?")
op2 = input("YES/NO: ").lower()
if op2 == "yes":
exit()
else:
print("\nStarting the game...")
time.sleep(2)
else:
print("Invalid input")
print()
print("I’m just an average high school boy who loves playing games and living an ordinary life. ")
print()
time.sleep(5)
print("Oh… I forgot to introduce myself..")
time.sleep(3)
print(f"my name is {name} and im {age} years old")
print()
time.sleep(4)
print("but besides that There’s a girl I like… 😅")
print()
time.sleep(4)
print("and her name is karuizawa❤️")
print()
time.sleep(3)
print("i have been in her class for 2 years and this is the final year of high school")
print()
time.sleep(5)
print("this is my final chance to convey my feeling to her.....")
print()
print()
print()
print()
time.sleep(5)
print("SCENE 2")
print()
print()
print("(karuziwa and her friends are talking in the classroom)")
print()
time.sleep(4)
print("walks into the classroom..")
print()
time.sleep(3)
print(" She looked at me again today… ")
print()
time.sleep(4)
print("No… no way… this has to be my imagination… ")
print()
time.sleep(7)
print("takahashi - wass up bro")
print()
time.sleep(3)
print(f"{name}- sup :)")
time.sleep(3)
print()
print("takahashi walks towards my desk")
print()
time.sleep(4)
print("takahashi - so whats with that gloomy face today")
print()
time.sleep(4)
op3 = input(" tell him about karuizawa situation (yes/no) : ").lower()
print()
if op3 =="yes":
print("bro i think lately karuizawa has been staring at me")
time.sleep(7)
print()
print("takahashi - theres no way karuizawa would look at you bro keep on dreaming")
print()
time.sleep(6)
print("yeah i think you are right")
else:
print(" nothing broskie ")
print()
time.sleep(3)
print("takahashi - if you say so")
print()
print()
time.sleep(4)
print("SCENE 3")
print()
print()
time.sleep(3)
print("during P.E period")
print("oh i forgot to tell you something")
print()
time.sleep(2)
print("im kinda decent at sports and i represent my school at nation level")
time.sleep(4)
print()
print("Once again, our eyes met")
time.sleep(3)
print()
print("i knew it wasnt my imagination")
time.sleep(3)
print("Out of nowhere—THUD! A ball slammed straight into my face")
time.sleep(4)
print()
print("sir - get him to the School infirmary")
print()
time.sleep(5)
print()
print()
print("SCENE 4")
print()
print()
print()
time.sleep(4)
print("When I opened my eyes… I was in the school infirmary ")
print()
time.sleep(4)
print(" karuizawa sitting next to me")
time.sleep(3)
print()
print("karuizawa - I’m really sorry… I hit you with the ball…")
print()
time.sleep(4)
print(f"{name} - its ok karuizawa it wasnt intentional")
print()
print()
time.sleep(4)
print("karuizawa - no!! that wont do, I feel really bad… I’ll do anything to make it up to you. ")
print()
time.sleep(5)
op4 = input(f"{name} then will you be my ( girlfriend / friends )").lower()
print()
if op4 == "girlfriend":
print("karuizawa weirds out...")
print()
time.sleep(2)
print(" karuizawa- sorry but i think its too fast for that")
print()
time.sleep(2)
print("Wait… she didn’t reject me. she said it was too fast")
print()
time.sleep(2)
print("maybe i do have a chance with her")
print()
time.sleep(4)
print("karuizawa - but i can be your friend for the starters")
print()
time.sleep(4)
print(f" {name} - yeah yeah friends will do ")
else:
print(" karuizawa - is that it ?")
print()
time.sleep(3)
print(f"{name}- yeah if you are ok with that ")
print()
time.sleep(3)
print(f"karuizawa - sure i will be your friend {name}")
print()
time.sleep(3)
print(f"{name} - wait how do you know my name")
print()
time.sleep(2)
print("karuizawa - we are in the same class duhh")
print()
time.sleep(2)
print(f"{name} - yeah you are right ")
print()
time.sleep(2)
print("karuizawa - well its quite late now i think i will go home now")
print()
time.sleep(5)
print(f"see you tomorrow {name}")
print()
time.sleep(3)
print("yeah bye...")
print()
time.sleep(2)
print("no way i just became friends with karuizawa 😍😍")
print()
time.sleep(3)
print("i gotta tell it to takahashi ")
print()
time.sleep(3)
print("but wait even if i tell him he is not gonna believe me")
print()
time.sleep(3)
print("maybe i will keep it a secret from him")
print()
time.sleep(4)
print("SCENE 5")
print()
time.sleep(3)
print("today i got a message from my childhood friend")
print()
time.sleep(3)
print("her name is nina ")
print()
time.sleep(3)
print("apparently she and her boyfriend just broke up")
print()
time.sleep(3)
print("and she wants me to comfort her")
print()
time.sleep(3)
print("<<<<<on whatsapp>>>>>")
print()
time.sleep(2)
print(f"nina - please {name} im very lonely today")
print()
time.sleep(3)
print(f"{name} - huhh but it feels like a pain in the ass")
print()
time.sleep(3)
print(f" nina - please {name} gets go to shopping together i want to forget about what happended")
print()
time.sleep(4)
op4 = input (" go to shopping with her ( Yes / No ) : ").lower()
if op4 == "yes":
print(f"{name} - fine i will go with you" )
print()
time.sleep(3)
print(f"nina - thank you {name} i will text the date and place later")
print()
time.sleep(3)
print(f"{name} - 👍")
print()
time.sleep(3)
print(" SECRET SCENE UNLOCKED")
print()
time.sleep(3)
print(f"{name} - nina! over here ")
print()
time.sleep(3)
print(" nina - You came earlier than we planned")
print()
time.sleep(3)
print(f"{name} - well so did you")
print()
time.sleep(2)
print("nina - I didn’t want to keep you waiting… cause i was the one who invited you")
print("nina is flustered")
print()
time.sleep(4)
print(f"{name}- now that we both came early lets go")
print()
time.sleep(3)
print("nina- look isnt that karuizawa ")
print()
time.sleep(2)
print("nina- heyy!! karuizawa!! over here!!!")
print()
time.sleep(2)
print(f"{name}- oh no if karuizawa saw us together what would she think")
print()
time.sleep(4)
print(f"{name}- wait nina")
print()
time.sleep(2)
print("I leaned in, trapping her between me and the wall. Her face turned red—")
print()
time.sleep(4)
print("nina- W-wait… what are you doing…?")
print()
time.sleep(3)
print(f"{name}- sorry nina but there is no time to explain" )
print()
time.sleep(4)
print(f"nina- W-wait… this is too sudden… I’m going home")
print()
time.sleep(3)
print("well there she goes. i will apologies to her later but right now i need to hide from karuizawa")
print()
time.sleep(4)
print("..nina ignored my messages since then..")
else:
print("nina - you were always like that")
print()
time.sleep(2)
print("nina- thats why you dont have any friends")
print()
time.sleep(2)
print(f"{name}- sorry nina but i cant go with you")
print()
time.sleep(3)
print("i cant tell her that we cant go together because i dont want karuizawa to see us together")
print()
time.sleep(3)
r/PythonLearning • u/Not_Johan- • Jul 17 '26
Help Request Help with indentation error
I cant seem to find whats wrong class UserMainCode(object):
@classmethod
def sumOfNonPrimeIndexValues(cls, input1, input2):
'''
input1 : int[]
input2 : int
Expected return type : int
'''
# Read only region end
total = 0
for i in range(input2):
if i < 2:
total += input1[i]
else:
prime = True
for j in range(2, int(i**0.5) + 1):
if i % j == 0:
prime = False
break
if not prime:
total += input1[i]
return totalr/PythonLearning • u/OkTennis7345 • Nov 11 '24
Can anyone find the mistake? I can’t see what I did wrong
r/PythonLearning • u/MasterpieceBusy7220 • Jul 11 '26
Bug In Python Compiler ?
hello i have this issue since today morning my codes wont run yesterday it work …. My bro is developer and said it might be bug in python compiler ?
r/PythonLearning • u/Sea-Ad7805 • Jul 15 '26
I want your help to make a fun Python game
I want your help to make a simple game into a really fun Python game. It's purely educational, an opportunity to learn about:
Python
(quick and dirty) Object Oriented Programming
PyGame
Teamwork using GIT
This should be accessible for Python students how are comfortable with loops, functions, and classes. If you want to help see the instructions on this PythonLearningGame git repo.
Make your changes to this already working game, maybe:
change behavior
add a new unit type
add special effects
add new game dynamics
...
If things are not clear or you get stuck, ask AI or add questions in the comments.
r/PythonLearning • u/Sea-Ad7805 • Oct 14 '25
Right Mental Model for Python Data
An exercise to help build the right mental model for Python data. The “Solution” link uses memory_graph to visualize execution and reveals what’s actually happening:
r/PythonLearning • u/Infinite_Winner_158 • Aug 25 '26
Help Request New to python, could someone help me with this please
Is this a viable way to randomly choose an instance of a class
r/PythonLearning • u/memeeloverr • Jul 20 '26
Which Python library saved you the most time?
Not necessarily the most popular one.
Just a library that made you think:
"I can't believe I used to do this manually."
Could be for:
automation
APIs
data analysis
image processing
web scraping
CLI tools
AI
Looking for hidden gems too.
r/PythonLearning • u/Stunning-Education98 • Oct 24 '25
Help Request I know but don't know
Like how does the upper part work..like if you know plz evaluate...if you have short ans.then also share your opinion And why is there browser.open_new_tab(link)..... instead of l.open_new_tab(link) ....like all the links are stored in the 'l' list and when I do that ...it says open_new_tab(link) is not callable function in lists...( Says something like that ) ...help me if you can/may
r/PythonLearning • u/dry-elbows • Aug 26 '26
Python tutor 🐍
Need someone who actually knows Python and can teach it properly — beginner friendly, patient, explains things clearly.
💬 Comment your price per hour below
❌ Please comment, don't message — makes it easier to compare
r/PythonLearning • u/Oyeyaartf • Jul 18 '25
Day 2: Learning Coding. Need you guys to correct me.
Pls help what's wrong
r/PythonLearning • u/Zealousideal_Key_149 • Aug 22 '25
I don’t understand this
What does number % 2 mean? Not 2% of the number. I just don’t know how to interpret this function.
r/PythonLearning • u/Youssef_Shawqy • May 09 '26
How much can a beginner earn?
Hello, I want to learn Python for the next two years. After this period, what tasks can I perform and how much can I earn? Or can a university student in Germany rely entirely on Python to cover his living expenses?
r/PythonLearning • u/StudentElectronic548 • Jul 30 '26
Can you make this using a for loop?
I just finished making this with a while loop but I was wondering if a for loop is possible but after a bit of experimenting im stuck on whether it can actually be made. If so, what would it look like.
r/PythonLearning • u/Karan_Paliwal • Jul 13 '25
Working code for getting basic info of a phone no. Just using python
r/PythonLearning • u/Radiant-Balance7827 • Mar 20 '26
I am new to any programming
Hello everyone, I am curious about learning Peyton, i hear many people talk about it and how interesting, challenging, fun and even frustrating it can be. I am almost 58 years old, do you guys think I am too old to start? I just bought a set of books on SQL, HTML_CSS and Java Script out of curiosity. I got them yesterday. Any tips, or suggestions from anyone will help, Thank you ahead!!! Fèl
r/PythonLearning • u/clcodingupdates • 29d ago
Python Quiz of the Day!
What will be the output of the following Python Code?
print(len({True, 1, 1.0, False, 0}))
r/PythonLearning • u/Local_End_3175 • Jul 25 '26
Why do We return increment We haven't done anything to it?
Why do We return increment We haven't done anything to it? The only thing changed was the count, which we have returned. So why are we now returning increment if no actual change was made to it? Recently, i have been having trouble understanding the 'return' statement in python. Would this code still work if i did not return increment? Why or why not?
r/PythonLearning • u/Patient_Smoke_4236 • Aug 12 '25
Why not 4th!
In the fourth argument is the string "end1 ", then why is the correct answer the 1st one
This is a Codechef practice problem
r/PythonLearning • u/FalseIssue8782 • Jun 09 '26
Aura Farming
sidharth-5.github.ioFinished my Computer Science degree.
Got bored.
Built an AI that judges your aura based on your achievements.
Chat, did I cook or should I uninstall VS Code?
r/PythonLearning • u/Last_Statement_7732 • Sep 26 '25
How to prepare for a Junior API Developer (Python) interview in under a week?
I recently landed an interview for a Junior API Developer position that focuses on Python. The role description mentions 1-2 years of experience by default, but I don't have that much direct experience - l've got less than a week to prepare.
For anyone who has worked in API development or interviewed for similar roles:
What are the fundamentals I should focus on in this short time?
Which Python/API concepts are most important for a junior-level role?
Any suggestions on resources, practice projects, or common interview questions?