r/learnpython • u/renncode • Aug 26 '26
Can I learn phyton without laptop? I don't have laptop heheh
???????
r/learnpython • u/renncode • Aug 26 '26
???????
r/learnpython • u/bfyvfftujijg • Aug 26 '26
How do I start applying tests to my code?
Do I just write separate scripts they run the code (either individual functions or entire scripts) against known inputs and check the output?
Is there a specific way people usually do this?
r/learnpython • u/Trick_Floor_519 • Aug 25 '26
hello guys i am struggling right now to understand a concurrency module asyncio ,i take a look over youtube videos ,but i feel stuck to understand coroutine object ,event loop await ,and this kind of matters, could anyone give me a concise explanation.
r/learnpython • u/sporty_outlook • Aug 25 '26
I’m trying to install Python via uv in Positron. I went to Select Session in the top-right corner, selected New Console Session, and clicked Install Python via uv. I then selected Python 3.14, but I get a “Failed to install Python” error.
Here is the relevant log:
2026-08-25 13:49:08.599 [info] Installing uv...
2026-08-25 13:49:09.353 [info] > powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
2026-08-25 13:49:19.761 [info] uv installed successfully
2026-08-25 13:49:19.764 [info] > uv --color never python dir
2026-08-25 13:49:31.917 [info] > ~\.local\bin\uv.exe --color never python dir
2026-08-25 13:49:32.628 [info] > ~\.local\bin\uv.exe --color never python list --managed-python
2026-08-25 13:49:36.117 [info] Installing Python 3.14 via uv...
2026-08-25 13:49:36.119 [info] > uv --color never python install 3.14
2026-08-25 13:49:36.119 [error] Failed to install Python 3.14: Error: spawn uv ENOENTWhat is confusing is that the log shows that uv was installed successfully and Positron can execute it using:
~\.local\bin\uv.exeHowever, when it actually tries to install Python, it runs:
uv --color never python install 3.14and fails with:
Error: spawn uv ENOENTI’m using Windows. Has anyone encountered this issue with Positron and uv? Is this a PATH/environment issue, or is Positron failing to find the newly installed uv.exe?
r/learnpython • u/Royal-Ant-1882 • Aug 25 '26
Hi i am a beginner and a minor and i dont know exactly how to explain this, but my previous coding teacher told me notepad++ wasnt that suitable for coding and i just need to know a different app so i can get back into it. Preferably something that can tell me if ive made a mistake instead of running something that wont work.
r/learnpython • u/7Voidz • Aug 25 '26
I hate admitting that I use AI to code. I have so many research projects in which I HEAVILY used AI. Now, I can explain the code, however, if I’m going to reprogram the whole thing, I’d either have to look again and again at the previous code or use ChatGPT.
What about debugging? Yeah no, ctrl+C ctrl+V into ChatGPT. I think this is because I’m lazy. I don’t want to take such a long time to debug when AI can give me the solution very quickly.
I’ve read some of the python documentation and it was… ok, but AI just explains it so much better and it takes much less time, but I can feel that I really can’t program well at all.
r/learnpython • u/Chance-Advice-1110 • Aug 25 '26
Is there possibly any way to hardcrash my old laptop for fun? I'm sorry if it sounds like I am making a virus. I had a fuckton of hardcrashes on my old pc so I was wondering if I can make a Programm to kill my of whithout needing to wait 5 minutes. Fuck this sounds stupid.
r/learnpython • u/Ok_Ask_6805 • Aug 25 '26
This is the error message that I get when I try to run pip install pygame. The same thing happens with pip3 install pygame.
py", line 6, in <module>
from setuptools._distutils.msvccompiler import MSVCCompiler, get_build_architecture
ModuleNotFoundError: No module named 'setuptools._distutils.msvccompiler'
[end of output]
-----------------------------------------------------------------------------------------------
these are the packages I have according to pip list.
Package Version
---------- -------
pip 26.2.1
setuptools 84.0.0
r/learnpython • u/Fabulous_Buyer_6256 • Aug 25 '26
the IDE i am using is saying my parenthesis was not closed when it was plz help
print("Once upon a time, in the ancient kingdom of " + q1 + " there lived a legendary " + q2 + " named " + q3 + ". Everyone in the village knew " + q3 + " for their remarkably " + q4 + " personality and an obsession with " + q5 + ". Every morning at " + q6 ", they would wake up, " + q7 + " three times, ")
[{
"owner": "Pylance",
"severity": 8,
"message": "(" was not closed",
"source": "Pylance",
"startLineNumber": 47,
"startColumn": 6,
"endLineNumber": 47,
"endColumn": 7,
}]r/learnpython • u/Absattarov • Aug 25 '26
Can i find other new learners here? I think it's more interesting to learn with someone.
I have some web background, worked with html/css(scss, bootstrap, tailwind)/JS
but it was two years ago actually. Now I want to learn Python so i can work with logic instead of designs.
r/learnpython • u/Turbulent_Web_8278 • Aug 25 '26
Can anyone suggest a practice project that span data engineering, analysis and data science that’s mature enough o be showcased to potential tech founders and c suite
r/learnpython • u/xu_shangchi • Aug 25 '26
I’m coding a restaurant type game and need to create a gui but have completely no idea how to do it. People have said godot is decent and that wxpython is decent for smaller stuff but i have no idea how to use either. Someone with a good amount of experience with either who could help would be great. Thank you
r/learnpython • u/Viva_Las_Vengeance • Aug 25 '26
Hello! I'm an A-level student and for my project have decided to make a chess game with AI that uses the minimax algorithm. I have some experience with coding before, and am planning to use OOP to represent the pieces and board.
I'm really really not sure how to go about this project, in particular, how the minimax algorithm will work, so if anyone could point me in the right direction I'd really appreciate it :)
r/learnpython • u/allstarmode1 • Aug 25 '26
Just wanted to share a quick reality check from my session today. I was working through page 88 of my Python book—specifically exercise 5-10—and out of nowhere, two error numbers popped up on the screen.
Naturally, what did I do? Instead of sitting there painstakingly isolating every single chunk of code and testing variables line-by-line like a textbook purist, I spent about 10–15 minutes moving things around, rewriting bits, flipping back through the pages, and then ultimately just copy-pasting the error straight into AI to get it sorted.
Honestly, it got me thinking: Is this actually considered "bad practice" by the book, or is this just standard, everyday coding for most people?
How often do you guys lean on quick fixes or AI assistance when a frustrating little error pops up, versus stopping to do the whole manual debugging process from scratch? Would love to know if I'm cutting corners or if this is just how it goes in the trenches.
r/learnpython • u/iiii870 • Aug 25 '26
I'm self teaching python. I have all the basics of cycles variables and conditions, I studied lists sets tuples and general data structures and coprehension, functions, lambda functions, classes methods and inheritance, I also learned other methods such as zip enumerate map and more. Now what's next? What progression should I follow to reach an intermediate level in the next months and advanced level later on?
r/learnpython • u/i88ronin • Aug 25 '26
I'm learning backend development and I really enjoy it!
I created my first API last month and got an amazing feedback! I work hard these days and created a new project.
What I learnt.
I ask feedback about everything, especially:
That's my new project:
https://github.com/daidallos-tech/football-club-api
You can find my first project in my github profile. It's called Movie_API.
P.S.
Thank you everyone for your time and advice. I really appreciate that.
r/learnpython • u/Finny_1870 • Aug 25 '26
Hey everyone!
I'm new to coding and I built my first game on Android using Pydroid.
What it does: Guess a number 1-100 with 5 lives. It tells you if you're WARMER 🔥 or COLDER 🥶
Features:
GitHub: https://github.com/elgriffin10/guess-the-number
Would love feedback! What should I add for v3.0?
r/learnpython • u/ElliotDotpy • Aug 25 '26
In my journey of trying to become a comp sci teacher, I read about these certification exams. I'm wondering what's the estimated percentage of people who take the exams and if the exams are helpful for either my resume or becoming a comp sci teacher.
r/learnpython • u/Healthy-Departure961 • Aug 25 '26
def print_models(unprinted_designs, completed_models):
"""
Simulate printing each design, until none are left.
Move each design to completed_models after printing.
"""
while unprinted_designs:
current_design = unprinted_designs.pop()
# Simulate creating a 3D print from the design.
print("Printing model: " + current_design)
completed_models.append(current_design)
unprinted_designs = ['iphone case', 'robot pendant', 'dodecahedron']
completed_models = []
in this code why used condition like this for while loop (while unprinted_designs:)
r/learnpython • u/soncannon7 • Aug 25 '26
my code isn't really complete, but whenever i try to run my script outside of the editor the terminal opens for a millasecond and then closes. can someone tell me what's going wrong?
import random
import keyboard
import pyautogui
import pyscreeze
import tkinter as tk
from pyautogui import mouseInfo, click
import time
def movethemouse():
if keyboard.is_pressed('g'):
pyautogui.moveTo(random.randint(0, 2600), random.randint(0, 2600))
def printer():
print('this is the mouse program')
time.sleep(10)
while True:
movethemouse()
printer()r/learnpython • u/ChairNew353 • Aug 24 '26
Hey there so I already tried some subreddits I would like to hear what are main one you guys use because I found it fun and productive for both learning python that is practical and makes me better at other social skill etc. I would like to hear if there is a special channel for python, but I am okay with searching throught teams what they use. Maybe something with backend on FastApi. And have a great day guys.
r/learnpython • u/A_Hot_MessTM • Aug 24 '26
I am currently working on a website (using Flask, SQLAlchemy and Jinja).
Context: I am making a ttrpg initiative tracker. For multiple fights to exist and be able to have multiples of the same creature and reuse creatures, the way I am formatting it is the user creates the base creature, and its row is duplicated, holding the id for the fight itself as fight_spec and the id of the base creature as og_id. I am currently working on making it so the user can edit the count of any creature in a fight.
For the page where the editing happens I want it to display the current count as the default value, but I cannot for the life of me figure out how to make sure it goes from python's for loop to html. My attempts typically end up with the value being set to "count_<id>" rather than the actual number that my count command generates. How should I go about this?
I have my current code below, but if there is a different way I should go about this, I'm open to hearing! Thank you <3
Python
unique_combatants = db.session.scalars(stmt).all()
for x in unique_combatants_set:
'count_' + str(x) = Combatant.query.filter_by(og_id=x, fight_spec=id).count()HTML
{% for combatant in unique_current_combatants %}
{{ combatant.combatant_name }}
<input type="number" name="combatant_count_{{combatant.id}}" id="combatant_count_{{combatant.id}}" value="count_{{combatant.id}}">
{% endfor %}r/learnpython • u/VanceDyer • Aug 24 '26
Hi everyone!
I'm very new to programming and I've been learning Python recently. I decided to make a small project to practice what I've learned.
I made a simple IP scanner using Python.
It has a menu with:
I'm using subprocess and ping to check if an IP responds.
I also started using functions, loops, lists, if/elif, while, and range().
It's probably a very basic project, but I'm pretty happy with it since I'm just starting out. 😅
Here is the code:
import subprocess
def menu():
print("-----IP SCANNER-----")
print("1. Scan all IPs")
print("2. Scan IP")
print("3. Scan IP range")
print("4. Exit")
opcion = input("Choose an option: ")
resultado_menu = int(opcion)
return resultado_menu
def escanear_ip(ip_int):
ip_int = str(ip_int)
ip_completa = "192.168.1." + ip_int
resultado = subprocess.run(
["ping", "/n", "1", "/w", "1000", ip_completa]
)
if resultado.returncode == 0:
lista_ip.append(ip_completa)
lista_ip = []
def imprimir_ips():
for si_ip in lista_ip:
si_ip = "🟢 " + si_ip
print(si_ip)
while True:
resultado = menu()
if resultado == 1:
for numeros in range(1, 256):
escanear_ip(numeros)
imprimir_ips()
elif resultado == 2:
seleccion_ip = input("Select the last digits of the IP: ")
escanear_ip(seleccion_ip)
imprimir_ips()
elif resultado == 3:
desde_ip = input("From: ")
desde_ip = int(desde_ip)
hasta_ip = input("To: ")
hasta_ip = int(hasta_ip)
for numeros in range(desde_ip, hasta_ip + 1):
escanear_ip(numeros)
imprimir_ips()
elif resultado == 4:
print("Exiting...")
breakI'm planning to improve it and make a V3 with more features.
Thanks!
r/learnpython • u/is2s • Aug 24 '26
i dont really "need" this per se but i think it would be pretty cool for me to be able to integrate it into a script i already have, but honestly if all of the libraries that interact with spotify need an account linked i just dont think its worth it. any of you have any ideas?
and actually, furthermore, how does spotify's architecture work in terms of like the identifiers for songs and authors, im assuming any presumed library would have an internal "song" object that you can fetch using an id or something along those lines?