r/learnpython • u/PotentialChannel2097 • Aug 24 '26
I need help pls
How can I remove in my python script the Windows bar at the top to drag and close please
r/learnpython • u/PotentialChannel2097 • Aug 24 '26
How can I remove in my python script the Windows bar at the top to drag and close please
r/learnpython • u/AutoModerator • Aug 24 '26
Welcome to another /r/learnPython weekly "Ask Anything* Monday" thread
Here you can ask all the questions that you wanted to ask but didn't feel like making a new thread.
* It's primarily intended for simple questions but as long as it's about python it's allowed.
If you have any suggestions or questions about this thread use the message the moderators button in the sidebar.
Rules:
That's it.
r/learnpython • u/soncannon7 • Aug 24 '26
dont question my code too much, i just started python and watched a 1 hour coding with mosh video to understand some of the basics.
all it does is move my mouse around while i hold g. but it doesnt work when i go into minecraft, and i assume, any program that locks my mouse.
what do i do?
import random
import keyboard
import pyautogui
import pyscreeze
from pyautogui import mouseInfo, click
while True:
if keyboard.is_pressed('g'):
pyautogui.moveTo(random.randint(0, 2600), random.randint(0, 2600))
if keyboard.is_pressed('q'):
breakr/learnpython • u/togoresuselle • Aug 23 '26
I've been learning python for years, but I rarely show my code to anyone. I enjoy showing the results of my code to people, but I don't know too many programmers IRL who can give me feedback. I know I have a habit of not commenting enough, but hopefully this is readable. It's my attempt at making text print like in video games (Earthbound, for example.)
Am I doing anything particularly inefficient? I want to know how I can improve this.
from time import sleep
import sys
#Theoretically there could be other wait times for punctuation
punc_default = {" ": 0, ",": 0.25, ".": 0.4, "!": 0.5, "?": 0.5}
def txt(string,time=0.05,punctimes=punc_default):
for char in string:
sys.stdout.write(char)
sys.stdout.flush()
if char not in punctimes: sleep(time)
else: sleep(punctimes[char])
txt("Who lives in a pineapple under the sea? Spongebob Squarepants! qwertyuiop.")r/learnpython • u/StarLonelyCee • Aug 21 '26
I need help with where to begin learning python. I have 0 experience in programming. So I need all the help I can get. Books, websites and courses(free as I can't afford to pay for anything right now) maybe YouTube tutorials.
But on the subject of YouTube tutorials I've seen it's not good to just follow along with the tutorials so what would be the best way of engaging with tutorials?
Please any suggestion is welcome and thank you very much in advance.
What helps you focus I tend to lose focus easily because my brain just suddenly remembers I have something I need to do when I decide to be productive.
Edit: Thank you guys for your suggestions. They've been very helpful. I see all of your replies; I just can't get to every single one of them, but I see them. Thank you very much.
I'm doing CS50P and also using Automate the Boring Stuff and this other book with small projects. Thank you guys so much.
r/learnpython • u/Mplus479 • Jun 18 '26
I'm learning Asyncio at the moment because I want to understand the code LLMs give me.