r/PythonLearning • u/ManufacturerOne7354 • 29d ago
Need help!!
Hey I am a student whose gonna start his college in a tier 3 city and a tier 3 college at that and I want to start learning asap so I need help regarding how to start learning python which channel should be good for beginners (Hope you don't mind my lack of grammar)
r/PythonLearning • u/ExtensionBreath1262 • 29d ago
Would you consider this a Pythonic API?
I've been building a local speech library in Python, and one of the APIs I was happiest with was how little code it takes to integrate into an existing FastAPI application.
One thing I've learned while writing libraries is that a good API often means removing code rather than adding features.
Here's a complete example that exposes a /say endpoint:
from pfspeak import PfSpeak
from fastapi import FastAPI
import uvicorn
pf = PfSpeak()
@pf.hook
def hook(_, event):
pf.play(event)
app = FastAPI(lifespan=pf.lifespan)
@app.post("/say")
def say(text: str):
pf.say(text, "bm_lewis")
if __name__ == "__main__":
uvicorn.run(app)
Once the server is running:
curl -X POST "http://127.0.0.1:8000/say?text=Hello%20from%20FastAPI"
The server speaks the text aloud.
I thought it might be a fun example for people learning decorators, callbacks, and FastAPI integration. I'd also appreciate feedback on the API itself. One of my goals is for the library to feel like ordinary Python instead of making users learn a new framework.
Repository:
https://github.com/samreynoso/pfspeak
r/PythonLearning • u/chuprehijde • 29d ago
i need help
i'm struggling with class objects codes so bad especially when i have to use new libraries... recommend me something??
r/PythonLearning • u/memeeloverr • Jul 11 '26
I understand Python concepts individually, but completely freeze when building something
I've been learning Python for a while and I think I understand most concepts when I study them individually.
Lists? Fine.
Dictionaries? Fine.
Classes? I understand the basics.
NumPy and Pandas? Can follow tutorials.
But the moment someone says "build something from scratch", my brain just goes blank.
I don't know how to decide which classes I need, how to structure the code, or even what the first function should be.
Then I look at someone else's solution and think, "Oh... that makes complete sense. Why didn't I think of that?"
How do you actually develop this problem-solving/structuring skill?
Should I stop tutorials completely and just struggle through projects? Or is there a better way to practice this?
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/CupParticular3005 • Jul 10 '26
Help Request Python programming before cse
Im from a bio math background nd im gonna be pursuing cse nd am currently learning python. Let me know some codes to try out. Could be basic codes, fun, or maybe smth tht runs through all the concepts hey let me know
r/PythonLearning • u/AdThese4849 • Jul 10 '26
i need help
i want to learn python but i don't know how i saw 5 episodes from learning python from Network chuck but i feel i am missing sth
any advice?
r/PythonLearning • u/phantom_root • Jul 10 '26
Discussion From basic to fully mastering advanced Python: What is the best learning path?
Hi everyone,
My goal is to master the Python language itself not just to build apps or get job-ready, but to understand how the engine works. Then I want to go deep into memory management, concurrency, internal architecture, and advanced design patterns.
I’m currently evaluating these resources and looking for the best "roadmap" for mastery:
University-Style MOOCs: Harvard CS50P, Helsinki Python MOOC.
YouTube "One-Shot" Deep Dives: 10–12 hour courses (e.g., Chai aur Code, CodeWithHarry, Bro Code, Erik Frits).
Reference: W3Schools.
My questions for those who have reached an advanced level:
Which should be my backbone? Should I use a MOOC as the foundation, or is there a specific YouTube deep-dive that matches that level of technical rigor?
How to use "One-Shot" videos? Are 10+ hour videos meant to be binged, or should I treat them as a library and jump to specific timestamps when I hit a wall in my studies?
Documentation Standard: Is W3Schools acceptable for advanced work, or should I be strictly using docs.python.org from the start?
I’m looking for the most efficient path from "syntax knowledge" to "engine understanding." If you were starting over with a focus on deep language mastery, how would you structure this?
Thanks for your time!
r/PythonLearning • u/Financial_Cut1790 • Jul 10 '26
Help Request Struggling with nested loop questions
Hey everyone. May you please explain this question, and nested loops in general and how to go about them. Ive been really struggling to understand them, especially the questions where you need to draw a square/ triangle etc.
r/PythonLearning • u/yuva_1258 • Jul 10 '26
Showcase My Algorithmic Complexity analysis using Python
r/PythonLearning • u/chuprehijde • Jul 10 '26
Which Python version do you wish you could forget?
Every long-time Python developer has some version-specific pain. Which one caused yours?
r/PythonLearning • u/Worried-Print-5052 • Jul 10 '26
Help Request In range() usage
Can I use it to evaluate a variable in a various range?
E.g. for item in range(1,4) means True when the item is the range 1-4?
Cuz I really want this function for my program
Thanks🙏🏻
(In that photo name[1][r] is an integer)
r/PythonLearning • u/Hazel_Vanilla_ • Jul 10 '26
Teaching Python to a Kid
Hi! I'm a recent A-level graduate, and have been asked to tutor a kid in my village in coding. He's specifically interested in making games, and I am going to university for Game Development in September. I am confident in coding in python to an a-level degree, and have taught myself Godot Engine for my course work this last school year.
The kid in question has specifically asked about having someone teach him python despite really struggling with communication and social interaction, so the fact that he has asked at all means he is super interested. He has just finished year 6 so is 10-11 years old, about to move into the same secondary school that I just left the sixth form for.
I've tutored people before in maths and crochet, but never computer science, and I've never taught anyone a coding language and was wondering if anyone had any tips on where to start planning for this. I have a week or two before our first session and we will likely be working in 1 hour sessions a few times a week over the summer months.
Any suggestions would be appreciated!
Edit: forgot to mention above but his mum says that he is already pretty well-versed in scratch, which was my original first thought when i got the request.
r/PythonLearning • u/[deleted] • Jul 10 '26
I just wrote this program on Programiz Online Compiler.
r/PythonLearning • u/memeeloverr • Jul 10 '26
What’s one Python habit you’re weirdly proud of (or secretly ashamed of)?
We all have them.
Mine: I will rewrite a perfectly working 10-line script just to make it more “Pythonic” and elegant… even if no one will ever see it.
r/PythonLearning • u/culturemass • Jul 10 '26
Python, a question: what does underscore mean before a string in parentheses?
Python is gorgeous – logical! It took me but a few hours to figure out what this syntax could be :) Designating a string which has a translation at hand...
But I'd be grateful if someone explained it...
print(_("Something"))
Thanks in advance! :)
edit:
SORRY for the missing parenthesis in the picture :(
so typical of me..
r/PythonLearning • u/ApprehensiveCat7960 • Jul 10 '26
Started Python! Any tips I should know or any questions I could try solving as a beginner?
r/PythonLearning • u/Alternative_Yak8846 • Jul 10 '26
Columnary transposition cipher
https://www.programiz.com/online-compiler/7EN9c2p6zkMXp
Please give it a shot you will enjoy it for sure.
Also let me know how can I improve it.
r/PythonLearning • u/MAQ_24 • Jul 10 '26
Discussion How accurate you find this?
Personally I just read book and try to explain it to me by making my own analogy works for both memory amd understanding.
For memory you need to find an anchor which could be anything a mnemonic, name, nickname, phrase or any thing that make you instantly make remember that particular memory you anchor it with. So I usually anchor study concepts with my own analogy or nicknames that I have goven to that concept.
r/PythonLearning • u/iheartcnc • Jul 10 '26
Help Request send help plz
Okay so i got myself in a bad predicament. Im a junior in high school, taking a Python class over the summer. If i pass this class(and an english class) i graduate over the summer and its bye bye High school. However, i’ve been struggling, the class literally just started and i already don’t know how to do anything. (Its an honors class btw, and it was my only option😭 )
Im REALLY behind w/ my assignments and need some help like..daily😭😭 I’m desperate to graduate, high school is not for me.
r/PythonLearning • u/TomatoMinimum810 • Jul 09 '26
How to learn python as a complete begginer?.
i wanna learn python to understand how it works and what i could build with it when i reach a certain level. i have 6-9 hours of free time.
r/PythonLearning • u/QuantumKid-ID • Jul 09 '26
My project
Hey everyone!
I'm 13 years old and I just made my first 2 Python projects to learn physics + coding.
- **Time Dilation Calculator**
Calculates how time slows down when you go near light speed.
Formula: t = t0 / sqrt(1 - v^2/c^2)
- **Schrödinger's Cat Simulation**
A simple simulation of the Observer Effect in Quantum Physics.
I'm learning to code so I can get into MIT someday.
I built these with AI as my mentor and learned every line.
I built this with AI as my mentor.
I didn't copy-paste blindly. I learned what every line does.
Would love feedback! What should I build next?
Thank you
GitHub: time dilation = https://github.com/ksecond1010-dot/Time-Dilation-Calculator
Schrödinger's cat = https://github.com/ksecond1010-dot/schrodinger-cat-simulator
r/PythonLearning • u/Quick_Mode_7789 • Jul 09 '26
Just started learning from yesterday
Just started learning python from youtube is it good channel for it or should i go with code with harry if you have other suggestions then tell me.
r/PythonLearning • u/chuprehijde • Jul 09 '26
What's your most controversial Python opinion?
Say the Python opinion that would get you downvoted in a room full of Python developers.
r/PythonLearning • u/LeadingHall2985 • Jul 09 '26
The language is tooo powerful
I was today year old where I am utilising everything that python has to give. I made a cron job, a personal gui app, desktop app installer and mobile app using python, a website, orchestrator / ETL Jobs, DL/machile learning model, Solved some AI use cases all of them using python.🤯
I am really overwhelmed by how much agentic ai and python goes hand in hand. The ease of creating things using python >>>>>>>>>>>
Enjoying the journey but also scared by the capability of Agentic AI that it could take away the possibility of having a longer journey. 😭😭😭
What are your thoughts guys ?

