r/learnpython • u/Upper_Trouble_8526 • Oct 03 '26
Why when i minimize pydroid and come again all i was doing is gone and all i get is this: / $
Title
r/learnpython • u/Upper_Trouble_8526 • Oct 03 '26
Title
r/learnpython • u/Miserable-Week3020 • Oct 03 '26
I'm a high school student who is interested in becoming an aerospace engineer so in the summer I decided to start building a rocket simulator in python for fun.
What it does so far:
.eng format) and interpolates them with numpy.interp instead of hardcoding constantsbpy) pipeline that imports a real 3D rocket model, keyframes it along the simulated trajectory, and renders it with CyclesWould really appreciate feedback on the code itself, structure, whether my module boundaries make sense, anything that reads as non-idiomatic Python, places I should be using classes instead of dicts/functions, that kind of thing.
Github : https://github.com/AliHilalii/Rocket-simulator
Thanks a lot guys.
r/learnpython • u/mangosbangos • Oct 03 '26
Any advice on the possibility of achieving this? I'd like to add tts models like Paul US, or Iviola UK in the program, choosing between them and having the ability to use filters
r/learnpython • u/Mystery-Magic • Oct 03 '26
Hello everyone, I am currently working on a pet project where I am trying to run Vosk (speech to text) model on Android device. For this I wanted some suggestions, can you guys share which tech stack and tools I can use for this?
I have used PyInstaller before which provides us functionality to build python app as Android too, so maybe I can try that. However I want to see if something better is available and also which libraries or separate language altogether can I use to make UI part of this. Any suggestions would be appreciated, I just want my Vosk model to be able to parse my voice to text in Android device and that's my only requirement.
Please give any information you have, thank you.
r/learnpython • u/Ok_Author_5388 • Oct 03 '26
yehh seniors i just stuck at the side off tutorial and i want to learn python fast i am learning from cs50p clearing or perhaps it's not i want now whenever i used to coding or solving some question i am blink and i want to out off it if anyone know how to do it or anything in this case please suggest me something
r/learnpython • u/vishesh_yadav_hear • Oct 03 '26
from yesterday i am trying to convert py to app with buildozer but ther were too many errors can any any pone help me in it i am using python 12.0
r/learnpython • u/shiming1234 • Oct 03 '26
I don’t know where to start learning or what knowledge I should acquire since nothing has been taught yet ,but l hope to have a plan for the future that can guide me when I begin studying and exploring different approaches. Thanks for you.
r/learnpython • u/mulgundsunil • Oct 02 '26
I have a large medical PDF where the information I need is already available as text inside pdf , but the problem is that simple PDF-to-text converters completely mess up the structure. The PDF has headings, tables, multiple columns, line breaks, and drug entries that continue onto the next page.
When I convert it to plain text, the text gets jumbled—for example, content from different columns can get mixed, headings can get separated from the information below them, tables lose their structure, and a drug entry that continues on the next page becomes difficult to associate correctly.
I need to process around 400+ drug entries automatically, so manually cleaning the text isn't practical. What is the best way to extract text from this kind of PDF while preserving the original structure and relationships between headings, tables, columns, and continued pages?
Should I use something like PyMuPDF, pdfplumber, Docling, Marker, PyMuPDF4LLM, or another approach? My end goal is to get clean, structured source text first and then use an LLM to convert it into JSON, while making sure the original information isn't lost, mixed up, or hallucinated.
r/learnpython • u/Upper_Trouble_8526 • Oct 03 '26
It doesn't work:
/storage/emulated/0 $ pytest
Traceback (most recent call last):
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/bin/pytest", line 3, in <module>
from pytest import main
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.13/site-packages/pytest/__init__.py", line 7, in <module>
from _pytest import version_tuple
ImportError: cannot import name 'version_tuple' from '_pytest' (/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.13/site-packages/_pytest/__init__.py)
/storage/emulated/0 $
r/learnpython • u/Nothingbutalsosome • Oct 02 '26
https://github.com/ZaidAHK/LENDnFUND
The project is just the syntax I wrote
r/learnpython • u/AberrantNarwal • Oct 02 '26
Hi all, just looking for recommendations on getting up to speed with conventions/syntax and quirks of Python for someone coming from the PHP world. I've got some grasp of OOP/SOLID/DRY/Interfaces/Abstractions etc... also experience with Frameworks so really looking for a crash-course on Python to get me up to speed and understand what's happening when I look at Python code.
r/learnpython • u/jackncurious • Oct 02 '26
Hello guys Im looking for a fast roadmap to learn and practice python. I bought a course in udemy called ' 100 Days of code : the complete Python Pro bootcamp ' but I do not know if it was a good purchase.
r/learnpython • u/Ajay2574 • Oct 02 '26
Yesterday I continued learning Python's "os" module.
I practiced working with folders and files using things like:
- "os.path.basename()"
- "os.path.splitext()"
- "os.walk()"
- Finding files by extension
- Counting files inside folders and subfolders
I also built a small file finder that searches through folders and counts how many ".py" files it finds.
Nothing complicated, but I'm realizing that these small exercises are helping me understand how automation actually works with files and folders.
My goal is to eventually use Python to automate repetitive tasks for real businesses.
I'm still learning, but I'll start sharing what I build along the way. 🚀
r/learnpython • u/Sad-Emu-5783 • Oct 01 '26
The Pattern:
* *
* * * *
* * * * * *
* * * * * * * *
* * * * * * * * * *
* * * * * * * * * *
* * * * * * * *
* * * * * *
* * * *
* *What my friend wrote:
n = int(input("Enter the number: "))
for i in range(1, n + 1):
for j in range(1, i + 1):
print('* ', end = "")
for j in range((n - i) * 2):
print(' ', end = "")
for j in range (i, 0, -1):
print('* ', end = "")
print()
for i in range(n, 0, -1):
for j in range(i , 0, -1):
print('* ', end = "")
for j in range((n - i) * 2):
print(' ', end = "")
for j in range (1,i+1):
print('* ', end = "")
print()What I wrote:
while True:
n = int(input("Enter an Even Number: "))
if n % 2 == 0:
break
else:
print("Number must be Even.")
myList = []
totalCharacters = (2 * n) - 1
for i in range(1, n // 2 + 1):
spaces = totalCharacters + 1 - (4 * i)
myList.append (f"{"* " * i}{" " * spaces}{"* " * i}")
print("\n". join (myList))
print("\n".join(myList[::-1]))As you can see, I came up with a formula for this pattern using "totalCharacters" and "spaces".
Which code would you consider more "Pythonic"? Like, in terms of flexibility and readability?
I'd also be happy to learn even better ways to print this pattern :)
r/learnpython • u/IngenuityMission5367 • Oct 02 '26
I am trying to make a text-based adventure game in Python, how do I make it so the text is typed out slowly and not instantly? I've tried ways online, but they keep returning None at the end. How do I fix this?
r/learnpython • u/anothernaturalone • Oct 02 '26
I'm coding a Sudoku generator to improve my skills and I'm hitting a brick wall with a specific function to get the "neighbours" of an index (so, all the numbers that it can't be the same as). Here's my current code, just rows and columns for now:
def neighbours(idx: tuple[int, int], board: np.ndarray) -> np.ndarray:
idcs = np.indices(board.shape)
print(idcs.shape)
neighbool = np.logical_xor(idcs[1] == idx[1], idcs[0] == idx[0])
return board[neighbool]This code does get the right values, but what I really want is to be able to modify those values and have the actual array be modified - so, to have a view. But about two hours of running around in the numpy docs has me completely stumped on any way to use a boolean array to index another array without it being a copy.
If I can't do it, I guess I'll have to use a list of slices dancing around the target index? Which sounds really headachey, and I'd love to be able to do it this simple way if it's in any way possible.
r/learnpython • u/AqueM • Oct 02 '26
Hi, I work with C# but wanted to refresh my Python knowledge. Have been thinking about solutions I know for my C# code and how they would work in Python, but ran into something that I'm not sure how to "translate" from C#.
public IWebElement button => driver.;
This will return me an element when called, even when on class construction it doesn't exist - as the expression is only evaluated when it's called, i.e. when I need it in code. As opposed to simply using = instead of =>, which would return a missing element exception on class build if the element is missing from DOM.
How would I do this in Python? I looked up lambda expressions, but I'm unsure if this would work/be very graceful, since I didn't find any mention of this as a solution that's used.
=
r/learnpython • u/DefinitionHuge2338 • Oct 01 '26
I'm attempting to deploy the latest Python Install Manager to a few computer labs running PyCharm in our school district, but am having issues. I was wondering if anyone here had some insight/tips to share.
Few facts up front:
- Config Mgr runs processes as either local System or the User who is logged in.
- Student accounts do not have access to command line or powershell, nor do they have access to their %AppData% folder in Explorer.
- Installing a UWP app as System does not make that app available for that built-in account, and the app is not installed for other users until they log in.
- PyCharm's automatic "let me download a Python runtime and set up an interpreter for you" isn't working; I have a ticket in with their support.
The issue I'm having is that deploying the Install Manager via Add-AppxProvisionedPackage doesn't then allow me to run py install --target="C:\Program Files". Students do not have admin privileges to install UWP apps (or edit environment variables), so the deployment script must run as System. But System does not actually get py.exe installed to their %AppData% folder. And b/c adding an .MSIX package to the Windows image doesn't actually install the app until a user logs in, I can't run py.exe out of another user's profile when the MSIX is added.
In theory, I shouldn't have to be doing any of this, b/c PyCharm has the ability to do so, but it's not working. It downloads the files to the student's %AppData% folder, but then fails to create an interpreter. Student's can't create an interpreter, b/c trying to "browse" to the Python files is blocked, b/c PyCharm opens an Explorer window, and they do not have access to their %AppData% folder in Explorer. Even if they use the terminal built-in to PyCharm to run py install, they would still need to set up an interpreter, which they cannot do. Thus, I'm in catch-22 scenario.
r/learnpython • u/vizardlord • Oct 02 '26
This might be basic questions I'm sorry in advance. A little background I got a BS in computer science with AI concentration. I have code on python, java script. I have some projects that I have done and now I want to see how I can make them a installable file that I can install on any computer ( example a download from a store or just a .exe) I been looking around and I might not be looking on the right places but I would like some guidance maybe were to look or a tool that people use for this?. Any advice is welcome.
r/learnpython • u/shdw_0x0 • Oct 01 '26
I’ve noticed that some Python things stick immediately, while others I understand but still have to Google every time I use them.
For me, stuff like list comprehensions and basic loops is fine, but I still occasionally forget the syntax for things like decorators, lambda, or working with dictionaries in more complicated ways.
Is this normal, or are there certain Python concepts that are worth making an effort to memorize instead of looking them up when needed?
r/learnpython • u/cross-coder • Oct 02 '26
What’s the best text book to read if you are learning python using cs50 video?
This is for absolute beginner.
r/learnpython • u/FactoryBuilder • Oct 01 '26
So I have a variable called Y with a changing value. If for loop variable X is some value, append Y to myList.
Every time it appends to the list, it changes every other already added item. I’m thinking the problem is that it’s not adding values but is instead adding references. So when Y changes, it changes every item in the list.
Why is it doing this and how can I stop it from doing this? I want it to append the value inside of Y, not a reference to Y.
Code: https://www.reddit.com/r/learnpython/comments/1wv4tpo/comment/pda098z/
What I'm trying to do is make a list of everywhere that there's a piece of a block. It's going to be a terminal Tetris game.
The playfield is a custom matrix, a list of lists. I dunno if that'll work well with lists. I did the same thing with arrays in another language. I don't know if Python's going to play nice or be special.
The blocks are also lists of lists. You could probably do that astronaut meme with my code "It's all lists of lists? Always has been"
r/learnpython • u/BenceeFarkass__01 • Oct 01 '26
Hi! I'm Bence and I want to learn in python. I started python programming like a month ago, and I want to be better in python programming. I wanted to ask u if u know any app or anything for learning python. (I know the start commands, print, input, and I know how to type an input like something = input() | print("Hi, !" {something}. Thanks for ur help, have a good morning/day/night! :)
r/learnpython • u/One_Smoke6858 • Sep 30 '26
I am build a program that basically executes some code and I want to add a timer so the user can see how long the program has been running for.
My issue is that I do not get how to move it to a different thread so it does not freeze.
What it needs to do is, run for 1 second then update a label and start the timer again.
Any resources I can read or help?