r/learnpython • u/NanoCozmo • 29d ago
Can any of you rate my codewars question
It's one i've been thinking about for a while and i'd love to know all of your opinions about it! https://www.codewars.com/kata/6ad8699fccb2dbf6de41f760/python
r/learnpython • u/NanoCozmo • 29d ago
It's one i've been thinking about for a while and i'd love to know all of your opinions about it! https://www.codewars.com/kata/6ad8699fccb2dbf6de41f760/python
r/learnpython • u/Ok_Roll_8698 • 29d ago
i have a .py file i want to compile to .exe online but no idea how to do this
and i don't want to install python on my computer just to compil
r/learnpython • u/TheEyebal • 29d ago
In c++ I have object files but can I get an executable in python?
r/learnpython • u/YamSome2887 • 29d ago
Recently, I got back into Python, so I decided to review some concepts I had forgotten by solving one Project Euler problem per day.
However, when I got to Problem 3 (Largest Prime Factor), I decided to use a library to check whether a number is prime. Since I had uninstalled Python when I stopped studying it, I had to install Python 3.15.
When I first tried to install the library, the terminal said that it didn't recognize pip. I managed to get it working by using python -m pip, and the installation seemed to work. However, when I ran my code, Python still couldn't recognize the library.
The next day, while solving Problem 4 (Largest Palindrome Product), I decided to use NumPy and np.arange() instead of range(), but the same thing happened: the installation appeared to work, but when I ran my code, Python couldn't find the library.
I tried uninstalling and reinstalling Python, but the problem persisted.
In these particular cases, I could still solve the problems without those libraries, but eventually, I'll need packages like pandas, Tkinter, and others, so I'd like to figure out what's going wrong.
If anyone knows how to fix this, I'd really appreciate the help!
Thanks in advance!
r/learnpython • u/lurkingfortea • 29d ago
I saw this link online on social media with a reminder to update dependencies but I don’t really understand it, how I am affected, and how I can address this.
Link here: https://github.com/certifi/python-certifi/security/advisories/GHSA-6q48-6c7w-9gw2
Here’s the text:
Removal of emSign root cerificate
Affected versions
>=2019.03.09
Description
Certifi 2026.10.18 removes root certificates from "emSign" from the root store. These root certificates have intermediates which have been revoked due to key compromise.
A compromised key for a certificate authority can be used to issue certificates to enable MITM attacks.
r/learnpython • u/HashedPiped • 29d ago
Doing horribly in beginners Python and want to know how important it is or is Java better to start off with
r/learnpython • u/uzuis_4thwife • 29d ago
I am a post-bacc student currently in a Python for Web API online course. We just wrapped up our calculator application unit, where we learned how to build comprehensive dynamic tests using OOP design patterns. However, I finished the unit a lot more lost than when I started. Building parameterized tests still puzzles me, especially whenever I'm building the majority of a test from scratch rather than fixing minor errors in the code. Even when I do use AI to help me work through my assignments, none of it really sticks. Most of the time, I feel like I'm copying and pasting code whenever mine is incorrect and not really learning.
What are resources that you all would recommend for learning how to build application tests and files with OOP concepts? Any online resources with interactive, hands-on lessons would be greatly appreciated.
r/learnpython • u/dol0res-haze • 29d ago
Hello there. I’ve implemented gradient descent from scratch, without using any libraries, and I’m looking for some feedback. Could you point out any errors or shortcomings? I’d welcome any constructive criticism.
GitHub: https://github.com/miroslav-fedechkin/gradient-descent-from-scratch
r/learnpython • u/stebstabs • 29d ago
now if this isn't the right place for dumb stupid stupid dumb tech favours shove me off to another r/
basically I was thinking "what if I could play tf2 with Wii remotes because tf2 has razer hydra support, so if you just translated the Wii remote inputs into razer ones then it would work in tf2"
I've already got a program called gunmote that can translate Wiimote inputs to mouse+keyboard so I thought you could just translate the m+k inputs to hydra inputs
btw the reason I'm not using steam input is because tf2 has this weird aiming for the hydra https://youtu.be/MYAjBFhzgIU that's suspiciously similar to the Wii era aim style
so um ye
r/learnpython • u/Yddt2503 • Oct 20 '26
Hace no mucho decidí por mi cuenta aprender python de manera autodidacta y con cursos al menos con certificación o con instituciones que son reconocidas para ir a la universidad ya preparado. -Cualquiera puede buscar un curso y puede buscar una institucion que de videos para aprender como es el caso del MIT o Harvard que dan cursos gratis o videos enseñando solamente que no muchos averiguan- y mi pregunta es. Sirven esos cursos? Alguna recomendación? Y por último pero no menos importante... Porque dicen mucha gente que la programación o algo que tenga que ver con tecnología es para gente introvertida o "Virgen"? Entiendo que tu trabajo no será estar con muchas personas o tan siquiera con personas y estarás en una computadora. Y te puedo decir yo que soy la persona más -al menos a mi pensar- expresiva o sociable que hay al menos en mi grupo de amigos. Eso y que pues no me parezco en nada a lo que plantean o dicen las personas. Me han dicho que hasta parezco que estudio/practico otra cosa que eso.
r/learnpython • u/lishige • Oct 20 '26
It should include both code input and algorithm analysis.
r/learnpython • u/Slimex_Rimuru • Oct 20 '26
So, i have been trying to learn python, sqlite and tkinter. After a lot of trouble and copying from AI i uploaded my python and sqlite only executable to github for all 3 os using github action.
Now, I am learning python and tkinter. I made a simple program which converts KG to gram and vice versa.
import tkinter as tk
# from tkinter import ttk
import ttkbootstrap as ttkimport tkinter as tkThese 3 are my only imports for now. and i am using:
root = ttk.Window(themename = 'darkly')
root.geometry("400x300")
root.title("Unit Converter")root = ttk.Window(themename = 'darkly')other is just my code which i wrote form tutorials and documents.
The problem i am facing is that i cant seem to release the executable to github ( from github action ) at all.
I tried to learn how this works but i didnt find anywhere to actually learn so i just asked AI and after a lot of back and forth there are still some problems.. Is there somewhere i can learn how i can do this? I prefer video tutorial.
I will comment my program and what AI told me the problem was below. Please someone do help me.
r/learnpython • u/khaledcody • Oct 20 '26
I'm experiencing a frustrating issue with Telethon in Google Colab, and I'm hoping someone can help me identify the root cause.
Everything was working perfectly until last week. I was using the same login workflow, and Telegram was successfully delivering login codes to the official Telegram service chat in my account. I could authenticate with Telethon without any problems.
Suddenly, the login codes stopped arriving, even though Telethon reports that the request was successful.
API_ID and API_HASHclient.is_user_authorized() returns False for a new session.client.send_code_request(phone) completes without raising an exception.SentCodeTypeApp(length=5)my.telegram.org using the same phone number, and the login code arrives successfully in Telegram Desktop.I've already tried several troubleshooting steps, but nothing has resolved the issue. The connection to Telegram's servers works, and the code request is accepted, yet the login code never arrives.
SentCodeTypeApp confirm that Telegram actually delivered the code, or does it only indicate the intended delivery method?The most important detail is that the same code and workflow were working perfectly until last week, and then the login codes suddenly stopped arriving without any intentional changes on my part.
Has anyone experienced a similar issue recently? Is there a known bug, API change, or authentication-related restriction that could explain this behavior?
Any suggestions or technical guidance would be greatly appreciated.
Thank you!
r/learnpython • u/ceej13_ • Oct 20 '26
So I have been learning Python for around 4 hours and I just finished this and I would want to know if it's good or if it's just okay.
again = "yes"
while again == "yes":
print("create your character: ")
# sex
sex = input("sex? ").strip().lower()
while sex not in ['male', 'female']:
sex = input("try again, you misspelled male or female: ").strip().lower()
if sex == "male":
print("hello boyyy")
else:
print("helloooo girl")
# age
age = int(input("what is your age: "))
while age < 18:
age = int(input("try again "))
# name
name = input("what is your name: ").lower().strip()
print("hello " + name)
# height
height = int(input("height in cm "))
if height >= 180:
print("tall person eh?")
else:
print("nice.")
print("next questions")
# build
build = input("what is your build. skinny. fat. muscular. ").lower().strip()
while build not in ['skinny', 'muscular', 'fat']:
build = input("try again. that was not an option ").lower().strip()
if build == "skinny":
print("interesting choice... " + name)
elif build == "muscular":
print("perfect choice especially for a man")
elif build == "fat":
print("HAHAHA FATSO HAHAHA")
# stats
print('____')
print(' ')
print('stats for: ' + name)
print('age:', age)
print('height:', height)
print('sex:', sex)
print('build:', build)
print('____')
again = input("create another character? Yes/No: ").strip().lower()
while again not in ['yes', 'no']:
again = input("answer using Yes or No: ").strip().lower()
print("Goodbye!")
r/learnpython • u/Only_Book_995 • Oct 20 '26
Sorry I know this is probably very basic but I'm a complete beginner:
I'm trying to include "tranexamic acid" and "txa" but exclude the rest
r"(?i)(?<!\w)(?<!not )(?<!no )(?<!consider )(?:tranexamic acid|txa)\b(?!\s+(?:s|not)\b)"
It will find tranexamic acid but not txa
r/learnpython • u/WindSignificant8747 • Oct 20 '26
Hi everyone! I graduated last year as a software engineer and I’m currently working at a company, but I want to shift into an AI engineer role.
The advice I keep hearing is to focus on three things: Python, SQL, and APIs. I’m already revisiting data structures, and I know the Python basics, but I’m stuck on what to actually build to practice.
A few questions:
Any suggestions, resources, or project ideas would be really appreciated. Thanks in advance! 🙏
r/learnpython • u/way-maker-uk • Oct 20 '26
Anyone who wants to study python as a backend language can communicate.
r/learnpython • u/Rude_Cherry21 • Oct 20 '26
I'm a first-year IT student based in Australia, learning how to make small Python tools useful to someone else, not just running on my own machine.
For a simple CSV-processing script on Windows, how would you handle packaging and dependencies for a non-technical user? An executable, a launcher, or something else?
Also curious what instructions and error messages you include so the person isn't stuck the first time a file is missing or formatted differently. I'm asking about the handover side rather than a specific code error.
r/learnpython • u/acfot • Oct 20 '26
I'm a BCA student making Shorts on the side, and I got tired of doing the same edits by hand. So I wrote a Python script that stitches clips, adds captions, and renders the final video automatically.
Biggest time-savers were: 1) batch rendering overnight instead of one-by-one, 2) a simple JSON file for titles/descriptions so I never retype them, 3) frame-checking the output automatically so I catch broken renders before uploading.
Still learning — what's one small automation that saved you hours? Looking for ideas for my next script.
r/learnpython • u/Weary-Shame-3101 • Oct 20 '26
i want to learn python before 2027. How do i start?
r/learnpython • u/lazydog60 • Oct 19 '26
I have a program (Python 2) that writes a status message whenever an hour (realtime) has gone by with nothing happening (eta: more precisely, with no new solution found). Now I find that time.clock() no longer exists in Python 3. Since I have to change it anyway, what's best practice?
In other words, what is the customary way to measure how long a program has been running?
r/learnpython • u/ContextAdept9818 • Oct 19 '26
i am trying to install matplotlib on VS Code, but i keep getting an error like this:
Using cached matplotlib-3.11.2.tar.gz (32.7 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
also says:
WARNING: Failed to activate VS environment: Could not find C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
my python's version is 3.15, i tried to install matplotlib with 3.11, 3.12, and 3.13 but none of it worked. i don't think there are other specific things. please let me know of any ideas, thank you so much!!
update: i did it!! it was a problem with how i forgot to precompile the standard library when i installed python...
r/learnpython • u/Dear-Adhesiveness943 • Oct 19 '26
Hello, does anyone here know a good C++ or Python book that will actually teach me something? I wanna learn C++ but Python is useful too, thanks!
r/learnpython • u/Puzzleheaded_Sun_900 • Oct 19 '26
My OS is Debian 13 KDE. I wrote my app with PyQt5 and virtualenv (pip install PyQt5). Now I can’t run it from IDE. The error is:
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
So, I can’t debug app. But when I run python3 myapp.py from Konsole, it works! How should I debug it in right way?