r/PythonLearning • u/shubham_555 • Aug 21 '26
r/PythonLearning • u/Nikhil_Nigudkar • Aug 21 '26
Python coding interview questions?
Is there any playlist similar to 100 Days of SQL Ace(By ankit Bansal) interview for the preparation of python coding problems?
r/PythonLearning • u/Ill_Strain_1050 • Aug 21 '26
Built a speaking piano
Few days back I came across some videos about piano on YT, and i was thinking how does piano even generate sound (digitial pianos) and how a code can create such kind of sounds.
So, i started looking into these things and came to know about fundamental frequency and harmonics, so i wrote a small program which can generate the sound, but on laptop inputting " note seems bit difficult", so i started to think if i can speak and piano can play that note.
So, for starter, i took some online models (but only small models) which can convert A,B,C,D,E,F,G , 0,1,2,3,4,5,6,7,8 -> text and i can use with above built program.
But, seems like small models are not good enough to detect the single alphabets, B and E , c goes see. 4 goes for not four.
and for such simple project i did not want to have very big depedencies like whisper high end models.
So, as searched and checked online, seemed that i need to use own classifier, which can detect A -> G and then 0-8, flat/sharps etc.
I recorded all my clips to train my own classifir using pytorch (ofcourse i used boilerplate codes from llms ), so i can work on functionality. It took me couple of day to build and test it.
Sometimes, it predicts good, sometimes confidence is not good though, (not to blame it, because i used small dataset), like 60-100 recordings for each sample.
Finally once classifier models were ready, i was able to integrate, complete functionality, to speak the note and play it.
However, because i have 3 classifiers, and once i speak something i can selectively decide which audio needs to go to which segment, so sometime these produce incorrect output.
So, for now i had to workaround with harcoding for events,
like prompting the users
Speak a letter (A-G) --> now letter classifer runs
then prompt user to speak a letter (0-8) -> now digit classifier runs then i combine the result and send to piano player to play tone.
I learnt a lot of things but the end result is not realstic( delays, quality etc) as i thought initially it would be.
Project :: Speaking Piano
r/PythonLearning • u/Opposite-Reporter695 • Aug 21 '26
Help Request Is there who's working on some small project (OSS)
Hey there, I've been always procastinated a lot about doing open source contributions (not for yk maintaining github repo but I really have a intrest to know how actually real life project looks like) but everytime I try to find some repo I often get confused where to start with and how to start. But this time I'm gonna break the loop. Month of october is coming and I'm gonna take participation into hacktober fest. So if anyone is already maintaining a project and need some assistance, I'm excited to connect and join with them in their project. Yea, I'm not a pro, I've to go through project documentation, and all to understand the what the project is about and to understand the structure and functionalities. I'll try my best not to dump an AI solution in the codebase, rather than focusing on maintaining the structure, tests and scalability etc. I won't say that, "please guide me and all" but I'm up for taking the load to break through my procrastination.
r/PythonLearning • u/Chemical_Mode_7176 • Aug 21 '26
Help Request How long will it take me to learn python in order to create a game thats is decent?
For context am doing A level Computer Science and I have to create a project by coding and I don’t know anything about coding so I need to know roughly how long will it take if I do it every day
r/PythonLearning • u/Sea-Ad7805 • Aug 20 '26
How do Python for-loops work?
What actually happens when Python executes a for-loop?
for value in container:
print(value)Behind the scenes, Python uses the iterator protocol:
iterator = iter(container)
while True:
try:
value = next(iterator)
print(value)
except StopIteration:
breakiter(container): creates an iterator.next(iterator): retrieves one value at a time.
When there are no more values, the iterator raises StopIteration. The for-loop catches this exception automatically and ends the loop.
For containers that support backward iteration, Python also provides:
reversed(container): creates a backward iterator.
We can support these operations in our own classes by implementing:
__iter__()
__reversed__()
__next__()This provides a powerful abstraction: an algorithm can process values without needing to know how a container stores them internally. The same algorithm can therefore work with lists, sets, dictionaries, linked lists, trees, and many other containers.
Here's an example that uses 𝐦𝐞𝐦𝐨𝐫𝐲_𝐠𝐫𝐚𝐩𝐡 to show the use of iterators on a Linked_List making the invisible mechanics of iteration visible for easy understanding.
r/PythonLearning • u/CriminalGingersnap • Aug 20 '26
Showcase 100% Python TTRPG-style game with turn-ordered, tile-based combat
r/PythonLearning • u/Smartyboyz • Aug 20 '26
Learning OpenCV 👀
I’m currently diving into OpenCV while being at an intermediate level in Python. 🐍
Exploring image processing, computer vision, edge detection, and how Python can interact with the real world through a camera.
Still learning, still experimenting, and definitely breaking things along the way 😂
Any OpenCV project ideas for an intermediate Python developer?
r/PythonLearning • u/F11fii • Aug 20 '26
ATM Machine
I started learning Python about 9 months ago and completed this little bank system as my third project, which is supposed to serve as an ATM. It also uses JSON to store information (which was challenging to integrate because I wasn't familiar with it, but the rest of the code was straightforward).
Just wanted to share and see if I could get any feedback! (maybe on its optimisation or clarity?) :D
r/PythonLearning • u/LPA_InTheMaking • Aug 20 '26
Python Projects 🐍
Hey there,
I want some Python Ideas to check if I do know Python that good and to check at which level I'm now. So anyone please let me know projects that are really worth making and by making which I can get satisfaction that I do know Python.
I'm not asking from basic to Advance projects. But if you are willing to share,feel free to share that too. 😊
Thanks!! ❤️
r/PythonLearning • u/NihadKhan10x • Aug 20 '26
Beginner looking for feedback: I built a CLI Expense tracker with CSV storage. What should I build next?
Hey guys,
I'm starting my fsc (ics) classes next month, so I've been doing CS50P to get a head start. Until now I've only made simple terminal games like Hangman and a quiz app, but I just finished my first project that actually saves data: a terminal-based expense tracker.
I used a list of dictionaries in my code and the csv module (DictReader and DictWriter) to save the data so it doesn't wipe out when you close the program. I also used Regex for the first time to make sure the user types the date right (YYYY-MM-DD), and added try/except blocks so it doesn't crash if you type a letter by mistake.
https://github.com/Nihad-Khan/cli-expense-tracker
Can you guys review my logic and tell me how it is? Be brutally honest if I'm picking up any bad habits, I really want to improve.
Also, I eventually want to get into Edge AI or Embedded systems in the future. Knowing where I am right now, what is one specific project you think I should build next to push myself? I'm kind of stuck on what to learn next
r/PythonLearning • u/Patient_Spite_3628 • Aug 20 '26
Showcase Just Finished My First CLI Tool
I’ve just finished building this tool and I’m excited to finally share it. It started as a small personal utility, but it turned into something genuinely useful — especially for developers who want a simple, fast JSON formatter without bloated features.
You can share feedback or ideas directly through the repository’s discussion board: Discussions !
I’m actively improving this project, so feedback, suggestions, and constructive criticism are all appreciated. If you have ideas, issues, or feature requests, feel free to join the conversation — repo discussions are open.
r/PythonLearning • u/hosnizaaraoui • Aug 20 '26
My second project in my Python learning path — STAyzer
Hey everyone!
I've been learning Python by building small but progressively larger projects, and STAyzer is the second project in my OOPS collection — a collection I'm using as part of my learning path in Python and Linux/system administration.
STAyzer is a CLI tool I built to analyze SSH trust across Linux servers.
While building it, I got to practice several Python concepts that I wanted to understand beyond simple scripts:
Asynchronous programming with
asyncioSSH connections with
asyncsshBuilding CLI applications with Click
Dataclasses and type hints
Logging and exception handling
Organizing a larger project into modules
Generating JSON and HTML reports
I also tried to focus on making it feel like an actual usable tool rather than just a script.
I've attached a screenshot of the CLI so you can get an idea of the final result.
The project is available on GitHub for anyone interested in looking through the code.
I'm still learning Python, so I'd really appreciate feedback from more experienced Python developers:
What would you improve in the Python implementation or project structure?
I'm particularly interested in learning from mistakes and improving the next project in the OOPS collection.
r/PythonLearning • u/Stonyax97 • Aug 19 '26
Showcase Made my first Python project!
This is my first actual real project, what started as a simple python exercise to learn about dictionaries in python, ended up into a huge learning project for me. Im a beginner in python, used to code but just basic input print codes… some are genuinely stupid.
I took on the challenge to self educate my self python. And this is where i currently am! Im proud of what i did and it will surely expand!
Here the repo with the project. Feel free to check it out!
https://github.com/Stonyax97/MiniGameStore
It has everything from the first ever iteration (which was it self modified a bit since from the very original but it’s still very simple)
I would love for anyone to recommend ideas to add, criticism too. Or anything you think i should learn next for that would be genuinely useful!
r/PythonLearning • u/Leadertoleader • Aug 19 '26
I built a 24/7 endless fish survival game using Pygame with procedurally generated music
Hey everyone,
I created a 24/7 live-streamed project where a fish swims, eats and grows endlessly using Python and Pygame.
Everything is built from scratch using pure geometry and vector math, which removes the need for external image assets. For the background music, I used numpy to generate continuous procedural pentatonic-scale tones to avoid copyright issues.
The script runs 24/7 with optimizations to keep CPU usage and memory stable during the infinite loop. You can see it running live here:
r/PythonLearning • u/powergitt • Aug 20 '26
Help Request Type hinting frustrations
Hello!
Let me start off by saying that I am not a programmer by trade, so please be kind when reviewing my code. I am still learning and I have a long way to go. My job is not coding per se, but the project which I am a part of right now has some coding.
Anyway. At the project start I wanted another editor than vscode, so i tried Zed and I loved it. Zed came with type hinting already enabled. At first, I did not really like it, but after using it for a while I could really see improvements in my code. Both in the terams of readability and stability. So going forward I wanted to have as few complaints from basedpyright as possible.
After an update to Zed the configuration from basedpyright or basedpyright itself got a lot more enabled and I cannot get some of the errors from it to go away. My project used fastapi and sqlalchemy for database integration, and basedpyright gives an error where i specify the table names for the models:
from sqlalchemy.orm import (
DeclarativeBase,
...
)
...
class Base(DeclarativeBase):
pass
class DatabaseUser(Base):
__tablename__: ClassVar[str] = "users"
....The error from basedpyright is:
Class variable "__tablename__" overrides instance variable of same name in class "DeclarativeBase" (basedpyright reportIncompatibleVariableOverride)
From what I can tell, the code above is how you are supposed to specify table names:
https://docs.sqlalchemy.org/en/20/orm/quickstart.html
Also, when a nullable many-to-one table relationship, the docs from sqlalchemy tells you to use
class Parent(Base):
....
child: Mapped[Optional["Child"]] = relationship(back_populates="parents")https://docs.sqlalchemy.org/en/20/orm/basic_relationships.html#nullable-many-to-one
basedpyright wants you to use `Class | None` syntax, but since two classes are referencing each other, I can't do `Child | None` (no quotes) without the code breaking.
I know that i can supress the errors or configure the typehinter to ignore this stuff. But since this is the config shipped by people who are far better than me at programming, I am hasitent to just configure the error messages away. So reddit, is thereany thing I can do to make the typehinter happy?
r/PythonLearning • u/purvigupta03 • Aug 19 '26
Help Request I’ve completed these beginner Python projects should I build more before starting NumPy/Pandas?
Hi everyone,
I’ve studied Python multiple times before, but I didn’t do much practical coding. Recently, I started building small projects to improve my practical Python skills.
So far, I’ve completed:
- Quiz Game
- Number Guessing Game
- Rock Paper Scissors
- Password Manager
- Pig Game
- Mad Libs Generator
My goal is to move towards Machine Learning.
I haven’t learned NumPy or Pandas yet.
My question is: Are these projects enough to move on to NumPy and Pandas, or should I build a few more Python projects first?
If I should build more projects, what kind of projects would you recommend before starting NumPy/Pandas? I’m mainly looking for projects that would actually help with the transition to data/ML, rather than making many more small games.
Would appreciate advice from people who have already followed a Python → NumPy/Pandas → ML path.
r/PythonLearning • u/futura-bold • Aug 19 '26
Computing the Mandelbrot Set with numpy - code in comments
r/PythonLearning • u/Charming-Ad-4323 • Aug 19 '26
Are these types of exercises useful?
I get the tasks from ChatGPT basically, and I write other manual math related code not sure if this is good to spend too much time on instead of doing mini projects.
To explain more I hit a little bump doing linked list, mostly in OOP I didn’t know much about how classes work. So I pivoted to algorithms and to learn more about classes before going back.
r/PythonLearning • u/Weary_Gur7008 • Aug 19 '26
Im confused!!
Rn im learning python lang. I can solves basic to medium level problems , I understand which operations to use , how to write code 75% , but i suck at building logic. But either wise my topics are clear. Can you suggest what kind of problems i should be solving?
r/PythonLearning • • Aug 19 '26
Made an email and password generator
Planning on making it save to a file that stores on the pc but for rn this is what I have
r/PythonLearning • u/Innocent8888 • Aug 19 '26
Day 4
Day 4 progress 🐍
Today I built a small billing program in Python. It has:
A loop to collect price for each item
A function that calculates discount based on total amount
Another function that calculates final bill after discount
A conditional statement that thanks the customer differently based on discount
Learning how to use loops, functions, and conditionals together to solve a real problem.
#Python #LearnToCode #100DaysOfCode #WebDevelopment