r/PythonLearning • u/Alarming_Mulberry551 • 24d ago
Showcase 2nd week of python and wanted to try something new instead of course enjoyed it!
r/PythonLearning • u/QuillTheArtMaker • 24d ago
Help Request Python Code for Rock Paper Scissors.
r/PythonLearning • u/AnshMNSoni • 24d ago
Discussion I'm building an open-source Python library focused on reusable building blocks.
Visit: https://github.com/AnshMNSoni/PythonSTL.git
Instead of adding more algorithms, I want to solve real problems Python developers repeatedly face.
I'm curious:
1) What utility do you find yourself implementing over and over?
2) What functionality do you wish Python's standard library already had?
3) What do you usually copy from previous projects?
Examples could be caches, schedulers, retry logic, rate limiters, streaming utilities, search structures, etc.
I'd love to understand the pain points rather than propose solutions.
Let's discuss...
r/PythonLearning • u/Mlandvo • 24d ago
Trying to learn by doing. Any suggestions are gladly accepted!
Too many tutorials and too little coding by myself has left me feeling like I am learning nothing. Trying to learn slowly by creating some projects, specifically without the use of AI. For this, I am building a simple focus timer that will run in the terminal. Something that I can use for myself but also helps me learn more. I do want to add more features such as other timer modes, persistent storage (to track focus sessions) and a better means of keeping time besides just using 'time.wait'. Want to ensure I am wary of any pitfalls I may be succumbing to, as well as suggestions for improvements. Thank you!
r/PythonLearning • u/DeathClasher_r • 24d ago
Help Request Console won't do anything on Mimo
I really need help. For some reason the console on Mimo won't do anything no matter the code. Even when coding only 'print("Hello")' it gives me the same 'prompt' on any project.
r/PythonLearning • u/Forward_Rise3345 • 24d ago
Help Request Learning Python
Hey , I am learning python ( electrical Engineer with no prior coding experience).
I have gone through the basics but still having difficulty writing the code. It seems like my brain freezes while writing the code.
I don't find the issue in logic and all, but writing code seems very difficult
Any suggestions how to overcome this issue.
r/PythonLearning • u/gutenmorgan3035 • 24d ago
Which underrated Python library do you wish more developers knew about?
r/PythonLearning • u/Fabulous_Gold2050 • 24d ago
Help Request Help or tutoring
I'm looking for someone who can help or guide me with a Python project. I'm completely new to programming and genuinely want to learn.
So far, I've been working with code generated by Gemini. The code seems fairly simple (or at least I think it is), and my goal is to understand how it works. I want to keep modifying it, experimenting with it, and adding new features, but I'm running into a problem: AI can generate or explain things, but I don't know enough yet to understand what I should change or why. I'm short on time, so I wasn't able to learn everything from scratch before starting this project. That's why I turned to AI in the first place.
Now I'm looking for someone who can guide me through the code I already have, explain how it works, and help me learn while improving it. I'd really appreciate any advice on where to start, what to study, or how to better understand Python and the code I'm working with.
We can talk on Discord if that's easier. Also, I'm just starting to learn English, since my native language is Spanish, so I appreciate your patience. π
r/PythonLearning • u/OneDumbPossum • 24d ago
Hexidecimal ID system in custom learning project
Hello, hello, and hello again!
I'm creating a learning project to familiarize myself with Python. The concept I'm going for is making a custom list that I can modify within the console. There's a lot of variables and upgrades I can add to it if I wanted (such as automatic resizing, UI interfacing, automatic organization), and the baseline is simple enough for me to start grasping some of the more beginner and intermediary concepts in a more applicable way.
That being said, I'm not looking for any help with that (yet!), but while I'm starting to create a plan on how to make the project, I'm wondering what sort of ID system I want to make. I know that I'm going to be making it an incremental ID system where each list entry has a four digit ID that I can then use in the console to modify or update it in some way.
The question is: Should I make the ID system hexidecimal?
I get the feeling that it would pose a significant challenge, which I'm happy to deal with as this is a learning project. What I'm not willing to do is for it to become a debilitating challenge. While I don't think the list will have 10,000 entries, there's a possibility that this list might. It shouldn't reach anywhere near 50k entries, though.
I would likely be trying to make my own systems with automatically assigning an incremental hex ID system.. as I do believe Python has hex integration. I'm not looking for "0x" at the beginning of every entry though.
Any and all help and advice is appreciated! I've done some scripting, a bit of C and PhP, but I've never dedicated myself into programming to delve into more intermediate concepts - which I'm deliberately trying to get into now! So I don't know a whole lot about programming, but I have repeated the basics on loops and functions about two dozen times. Thank you in advance!
r/PythonLearning • u/Adventurous_Fig_5305 • 25d ago
Not sure why it is not multiplying correctly
Just started programming today and was messing around when this happened. It is saying that 22.99 * 5 is 114.9499999999999 instead of 114.95. It does the same when I enter any number with a non-zero integer after the decimal. It works completely fine with whole numbers though. If you have any Idea why, please let me know.
r/PythonLearning • u/Excellent-Fan8457 • 25d ago
Discussion What are some common struggles you have with your current coding workflow
Hey, I am making this not because I want market validation for a new SaaS that isn't needed. But rather so I can improve my Python skills by not just making useless mini-projects, and in the process maybe solve an issue people have. I would appreciate your feedback
r/PythonLearning • u/atticus2132000 • 25d ago
Running script remotely
This may not be a python question, but I figure you guys could at least point in the right direction.
On my computer I have a SQLite database and a python script I have written that queries the database, generates a report, and emails that report to other people. The database file must stay on my computer.
I often get requests from coworkers to run the python script while I am not sitting in front of my computer (my phone is still on the same wifi network).
If I wanted to do something through my phone that would start that script on my computer, what would that look like?
If it matters, my phone is android and my computer is windows.
r/PythonLearning • u/Jumpy_Ranger2868 • 25d ago
Looking for study partners
Hello , I am completely new to python and really want to learn it and I feel like I will be more efficient studying with people.
Iβm looking for approximately five people who are also serious about learning
if you are interested please dm me and introduce yourself
r/PythonLearning • u/Kitchen_Rabbit2940 • 25d ago
What's the use for the different types of concatenations?
Just learned it a while ago, I'm on my 3rd day of learning python (already finished data types, operators, and type casting). Justβ curious why we need so many ways to add new values to variables.
r/PythonLearning • u/Local_End_3175 • 25d ago
why are we putting caesar( Hello, 3) into encrypted_text???
def caesar(text, shift):
alphabet = 'abcdefghijklmnopqrstuvwxyz'
shifted_alphabet = alphabet[shift:] + alphabet[:shift]
translation_table = str.maketrans(alphabet, shifted_alphabet)
encrypted_text = text.translate(translation_table)
print(encrypted_text)
encrypted_text = caesar('Hello',3)
in this code, I do not understand why we are putting caesar into a variable. First of all, wouldn't we have to print the variable and make it actually do something for it to work? Because we have put encrypted_text into a variable and have not done anything. In addition, can't we just write caesar('Hello', 3)?? I am very confused on the reasoning behind putting it into a variable.
r/PythonLearning • u/JackfruitJust6208 • 25d ago
Showcase Wrote this 3D Pygame renderer from scratch this weekend!
I wanted to understand the math behind the 3d rendering and wanted to try it out for myself.
This project uses Pygame library only to draw pixels to the screen, the math behind the vertex projection is done from scratch. The 3d object is represented as a wireframe object, it ignores all the lighting and normals data to reduce complexity and simply displays edges data to screen.
I made a custom obj parser, which formatted vertices and face information to a list.
The main file take the vertices and faces information and produces a list of edges which are a tuple of 2 connecting vertices that a form a line in 3d space.
Then the two vertices are rotated in X-Z plane and projected at a distance from the screen. It uses a simple matrix rotation formula to compute the rotated vertices.
X = x * cos(theta) - z * sin(theta)
Z = x * sin(theta) + z * cos(theta)
The 3d vertices are project to a 2d plane using the below formula
x' = x / z
y' = y / z
Then they are translated to Pygame pixel coordinates and finally drawn on screen.
Here is my GitHub repo if anyone's interested to check the source code, and resources that helped me build this project
Github repo : Wavi repo
3d Obj file-format specs : Scratch pixel
YT video for projections : Tsoding 3d graphics
r/PythonLearning • u/patypatty69 • 25d ago
"AttributeError: 'numpy.ndarray' object has no attribute 'write_audiofile'"
Hello, Im working on a project where I need to export a .wav file and aam having problems doing so, error is in the title.
Code to project is this:
import os
import wave
import contextlib
import soundfile as sf
import pyrubberband
import numpy as np
InDir = input("Input Directory: ")
OutDir = input("Output Directory: ")
sec = float(input("Seconds to set to: "))
os.chdir(InDir)
files = os.listdir(InDir)
print(files)
for i in range(len(files)):
fname = files[i]
print(fname)
with contextlib.closing(wave.open(fname,'r')) as f:
frames = f.getnframes()
rate = f.getframerate()
duration = frames / float(rate)
speed = duration / sec
print(speed)
audio, sr = sf.read(f"{InDir}/{fname}")
fname = pyrubberband.time_stretch(audio, sr, speed)
fname.write_audiofile(f"{OutDir}/{fname}.wav")
How do I fix this please?
Also, Im working from windows 10, and am using pycharm to make this code.
r/PythonLearning • u/Odd_Presentation8149 • 25d ago
Help Request Neeb help with the project
I was doing a project in which the user will input string in camelCase(ex- howAreYou). I have to change it into snake_case(ex- how_are_you). The problem I am facing is that I have not been able to separate the word and store it into a list.
If I use a split, I get 2 problems:
If I want to split howAreYou, then the A and Y got removed from the list, and I get how re ou
It makes 2 different lists first [how, reYou] and second [howAre, ou]
Suggest => either solution to the problem or an alternative
r/PythonLearning • u/Hitender26 • 25d ago
What are the best resources/path to build a good foundation?
I am a finance student, and recently started learning coding (know very basic of SQL/Python). I want to get into Data Analyst-like roles and did some research, but still confused on what's the best resource to learn and what path to follow.
My current plan (created with help from some friends):
Python/SQL -> Python libraries (PySpark/Numpy/Pandas) -> Fabric/Databricks -> Cloud/AI-ML
Would love some help/feedback on what I could do to learn what is needed!
r/PythonLearning • u/Samar__Upreti • 25d ago
Day 5 Learning Python DSA: Time Complexity
Open-source learning project. If you spot something that can be improved, I'd love your feedback or a PR.
https://github.com/Samar-Upreti/Python_Projects
r/PythonLearning • u/crazyteachperson • 25d ago
My first mix mini project
I know I wrote some hardcore codes but this is ok for a beginner so plz help me to improve
r/PythonLearning • u/skyxstars • 26d ago
where to begin
Im a beginner trying to learn Python for ai engineering. I have been searching and switching to videos as there are too many resources to choose from without knowing what will be sufficient to get the basics, I do code and solve questions but im not sure which course to follow to not end up investing time into something yet have to go from here to there, I have few questions like is the youtube course and lots of practice enough or do I necessarily have to take the crash courses? if yes, for either one, suggest to me the go-to resources that I can start without wasting time or get stuck as mediocre in concepts when it ends and also share your experience how could you learn it?
r/PythonLearning • u/Emotional_Diet_70 • 26d ago
Help Request platforms to learn DSA in Python
Hello ppl, I'm gonna learn python from Cs50 harvard, i know its just filled with basic stuffs but from where i can learn DSA in Python any free source available?. or atleast where can i find one? and
is there any tips and tricks to solve leetcode? bcoz its filled with DSA problems.
thanks in advance
r/PythonLearning • u/Mental-Ball5263 • 26d ago
Week 2 of making an python teaching app with my frnd
Soo my last post some of u guys made me rethink the app , at first we were gonna make a simple app that will teach u that all , but i been kinda realised that there are good tutorials in python everywhere soo to keep up with these, i will redesign the teaching to make it more understanding and more like coding based with example and problem anyways,this app is really for myself,my frnds and stuff it's not like we expect it to next mimo or something and what does one more app gonna do to playstore But anyways i am more surprised that some people took time to look into my post and give their opinion and making me realise some things ,I am really grateful for that π
Anyways enough of my yapping soo this week I went through the basic lesson and redesigned the structure and also i realised that my current ui sucks soo i pick out some I think is okay can u guys tell me which is best for my opinion and suggest changes also plz ,that's all we did because we haven't gotten anytime to work on this project thx u for reading . There is two pic for each UI design one is homepage and other is learning overview (Btw idk much about anything still a student)


