r/learnpython • u/alex123711 • Sep 26 '26
Is it still worthwhile doing Helsinki Python MOOC?
With all the Programming tools coming out now, is it still relevant/ worthwhile to learn programming?
r/learnpython • u/alex123711 • Sep 26 '26
With all the Programming tools coming out now, is it still relevant/ worthwhile to learn programming?
r/learnpython • u/Weird-Evening-2580 • Sep 26 '26
Hey so i have a old laptop who's specifications are 512 hdd,6gb ddr3 ,intel i5-3317U and a intel hd 4000
Basically its a very old laptop
I want to start learning a bit of python and vs code is slow for me,any methods to make it faster or any recommendations for a new ide?I don't really want to use Thronny or Thorny,whatever it is.I hate the ui
Sorry for the bad question
r/learnpython • u/lolololloloolmemes • Sep 26 '26
i have a school work project in which I need to create a function called weekly that will output the average minimum and maximum of data by a certain row, I have tried relentlessly to figure this out but I cannot seem to, here is the code, it would be awesome if i could get some advice on how to do it at a similar level of complexity to the code provided :).
rows = 52
cols = 7
def readFile(filePath):
array = [[None]*cols for i in range(rows)]
with open(filePath) as readfile:
r = 0
line = readfile.readline().rstrip('\n')
while line:
items = line.split(",")
for c in range(cols):
array[r][c] = int(items[c])
r += 1
line = readfile.readline().rstrip('\n')
return array
def yearly(array):
yearTotal = 0
for r in range(rows):
for c in range(cols):
yearTotal += array[r][c]
print("Yearly total: " + str(yearTotal) + "\n")rainfall = readFile("csvs/rainfall.csv")
yearly(rainfall)
r/learnpython • u/Capable-Surround3021 • Sep 26 '26
I've started CS50P twice and dropped it both times around the point where the problem sets got hard. Talking to others, that seems to be pretty common. What I've noticed is that I finish things when there's a fixed date and people expecting me to show up.
So I'm organizing a small experiment:
This isn't affiliated with CS50 or Harvard, it's just me trying to see if there is potentially value in such initiatives.
If you're interested, fill in this 2-minute form: https://luma.com/hyamr708
Beginners, career changers, and anyone who's started this course before and stalled are especially welcome.
r/learnpython • u/SeaworthinessFew9704 • Sep 26 '26
I've been learning python for a while now but I feel like I have a lot of gaps in my knowledge. I don't really like video tutorials cus I feel like they are too slow and don't cover everything. I am looking for some PDF or documentation that covers everything from start to end. Please suggest if you know anything that could help. Thank you :)
r/learnpython • u/C0BAZ • Sep 26 '26
Okay, so I pretty sure this is both possible and supposed to be simple.
I have a project using PyDub to convert audio and get details about it. It of course needs to access ffmpeg to do so. So, I got the ffmpeg.exe and ffprobe.exe and have them in the .venv/Scripts folder, which PyDub accesses just fine.
I now am trying to package this into a standalone .exe file with PyInstaller. However, when PyDub tries to get ffmpeg when running the exe, it looks in the exe's directory for it. (That is, I can't find it normally, but if I come in and add them into the exe's folder, it can find them). I've made sure to include the ffmpeg files in the exe with a .spec file.
I assume the problem is that PyDub isn't looking inside of the exe for ffmpeg. I don't really know much about how that kind of thing works, so an explanation of that could alone be helpful. But what I want specifically is:
How to get PyDub to access ffmpeg inside the exe file?
r/learnpython • u/Intelligent_Life_412 • Sep 26 '26
Hi, I'm trying to extract exam questions from multiple pdfs, containing text and images, but I'm having trouble getting it to work because the questions and documents don't follow a strict pattern, for example:
Question numbers can be: question 1, 01, q1...
Alternatives can be: A), (A), A., A, A- ... etc,
The other thing is that there is usualy some text in the page that isn't from the question, like:
Write here, page 1, the name of the institution, among other things...
I'm tryng to do this for thousands of questions, how do you guys recommend i do this?
r/learnpython • u/Sam-312 • Sep 26 '26
Hello, I hope you're all well. This would probably sound like a rant for some of you, but it is a genuine concern of mine. I started learning Python a week +ago (I study every day) I am learning through a Google course on coursera, and I use Google Colab. I am sad to say that this week has been quiet a revelation for me as I discovered how stupid I am. A week of daily study and I still can't write a single function other than "print ("Hello, world!").. I guess I am trying to figure out if that's a common occurrence or is it just me being too stupid to learn programming.. I'm genuinely concerned about my ability to learn, as a 37 year old.. Is this amount of difficulty normal or is it just me?
r/learnpython • u/z4xr • Sep 26 '26
im starting on learning python but I don't know how to do it properly? I am learning using visual studio code with Python extension for Visual Studio Code on Mac 👍
r/learnpython • u/shabba1221 • Sep 25 '26
I’m a physician, so don’t know anything about CS or programming/developing. I recently got in a talk with some friends that work with in this field and got the itch of trying to learn something new. I’ve seen videos talking about boot.dev.
Does anyone have any opinion on it?
Thanks
r/learnpython • • Sep 25 '26
Hello, I am just learning python. I am trying to make a temperature converter that asks for the temperature and whether it is Celsius or Fahrenheit, then calls the correct function and prints the result. I have managed to create this, but it prints an additional line with the temperature and degree equaling None degree. Ive posted my code and the result below. Any suggestions on why it is doing this?
def celcius_to_fahrenheit(c):
f = (c * 9/5) + 32
print(f'{c}°C = {f:.2f}°F')
def fahrenheit_to_celcius(f):
c = (f - 32) * 5/9
print(f'{f}°F = {c:.2f}°C')
def temperature_converter():
temp = float(input('Enter temperature: ' ))
unit = input('Celcius or Fahrenheit? ').upper().strip()
if unit == 'C':
print(f'{temp}°C = {celcius_to_fahrenheit(temp)}°F')
if unit == 'F':
print(f'{temp}°F = {fahrenheit_to_celcius(temp)}°C')Enter temperature: 100
Celcius or Fahrenheit? c
100.0°C = 212.00°F
100.0°C = None°F
Enter temperature: 98.6
Celcius or Fahrenheit? f
98.6°F = 37.00°C
98.6°F = None°C
r/learnpython • u/Key_Cloud_7002 • Sep 25 '26
I'm trying to make spell checker program that will compare words from a text file to a dictionary of words that are in alphabetical order. If the words don't appear in the dictionary they should show up in a list as potentially incorrect. The list is named absent[] that will be outputted at the end. I need to use a binary search to iterate over the dictionary of words comparing them to the words from the text file. However the program is only getting the last word from the text file and comparing the letters to the words in the dictionary. I have no idea why its doing this but I believe the problem starts at the line for i in firstLst:. Any help would be appreciated. Here's the code I have thus far:
def binarySearch(): fnameOne= input("enter file") with open(fnameOne,"r") as file_dataOne: for lineOne in file_dataOne: for word in lineOne.split(): firstLst=word
fnameTwo=input("enter dict")
with open(fnameTwo,"r") as file_dataTwo:
for lineTwo in file_dataTwo:
for wordTwo in lineTwo.split():
secondLst=wordTwo
absent=[]
for i in firstLst:
lo,hi=0,len(secondLst)-1
found=False
while lo < hi:
mid = (lo +hi) //2
if secondLst[mid]== i:
found=True
break
elif secondLst[mid]<i :
lo=mid+1
else:
hi=mid-1
if not found:
absent.append(i)
print("Words not in dictionary : " ,absent)r/learnpython • u/Charcoal73 • Sep 25 '26
I'm attempting to make some code that generates a sudoku that you can then subsequently solve but I'm having a bit of an issue with getting it to follow the rules.
The code is meant to generate a random number as well as a random set of coordinates on a sudoku board. it is them meant to check that that random number can go in that location by seeing if any other of that number exist within that row or column. if this is the case it will generate a new number until it fits the criteria needed. it will repeat this process 17 times total to get a sudoku board ready to solve.
for some reason it is resulting in multiple of the same number being in the same column and or row.
i also need to add some code that makes sure it will stop any of the same number being in any of the 9 boxes but i haven't gotten that far yet
import random
rows = [[" "," "," "," "," "," "," "," "," "],
[" "," "," "," "," "," "," "," "," "] ,[" "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "]
,[" "," "," "," "," "," "," "," "," "]]
for i in range(17):
rownum=random.randint(0,8)
columnum=random.randint(0,8)
num = random.randint(1,9)
while str(num) == rows[rownum][0] or str(num) == rows[rownum][1] or str(num) == rows[rownum][2] or str(num) == rows[rownum][3] or str(num) == rows[rownum][4] or str(num) == rows[rownum][5] or str(num) == rows[rownum][6] or str(num) == rows[rownum][7] or str(num) == rows[rownum][8] or str(num) == rows[0][columnum] or str(num) == rows[1][columnum] or str(num) == rows[2][columnum] or str(num) == rows[3][columnum] or str(num) == rows[4][columnum] or str(num) == rows[5][columnum] or str(num) == rows[6][columnum] or str(num) == rows[7][columnum] or str(num) == rows[8][columnum]: #this section is the problem at the minute
num=random.randint(1,9)
rows[rownum][columnum] = num
print(f"""
{rows[0][0]} {rows[0][1]} {rows[0][2]} | {rows[0][3]} {rows[0][4]} {rows[0][5]} | {rows[0][6]} {rows[0][7]} {rows[0][8]}
{rows[1][0]} {rows[1][1]} {rows[1][2]} | {rows[1][3]} {rows[1][4]} {rows[1][5]} | {rows[1][6]} {rows[1][7]} {rows[1][8]}
{rows[2][0]} {rows[2][1]} {rows[2][2]} | {rows[2][3]} {rows[2][4]} {rows[2][5]} | {rows[2][6]} {rows[2][7]} {rows[2][8]}
------|-------|-------
{rows[3][0]} {rows[3][1]} {rows[3][2]} | {rows[3][3]} {rows[3][4]} {rows[3][5]} | {rows[3][6]} {rows[3][7]} {rows[3][8]}
{rows[4][0]} {rows[4][1]} {rows[4][2]} | {rows[4][3]} {rows[4][4]} {rows[4][5]} | {rows[4][6]} {rows[4][7]} {rows[4][8]}
{rows[5][0]} {rows[5][1]} {rows[5][2]} | {rows[5][3]} {rows[5][4]} {rows[5][5]} | {rows[5][6]} {rows[5][7]} {rows[5][8]}
------|-------|-------
{rows[6][0]} {rows[6][1]} {rows[6][2]} | {rows[6][3]} {rows[6][4]} {rows[6][5]} | {rows[6][6]} {rows[6][7]} {rows[6][8]}
{rows[7][0]} {rows[7][1]} {rows[7][2]} | {rows[7][3]} {rows[7][4]} {rows[7][5]} | {rows[7][6]} {rows[7][7]} {rows[7][8]}
{rows[8][0]} {rows[8][1]} {rows[8][2]} | {rows[8][3]} {rows[8][4]} {rows[8][5]} | {rows[8][6]} {rows[8][7]} {rows[8][8]}
""")r/learnpython • u/thegreatdamus • Sep 25 '26
This question may be a dumb question in 2026 with all the AIs out there, but i've noticed Gemini is using a stackoverflow post from 2016 to answer my question.
So I really wanna know from any of you Python masters, what's the best practice:
Should I install jupyter notebook in each newly created conda environment? Should I not? What do the pros do in 2026?
r/learnpython • u/musbur • Sep 25 '26
I have one service S1 that occasionally does something. I want another service S2 to take action triggered by the first service's activity. I can think of three methods:
Importantly, S1's operation should be completely unaffected, whether S2 is listening or not. S1 shouldn't have to deal with un-consumed messages when S2 is down. Any thoughts?
r/learnpython • u/HappyCanary291 • Sep 25 '26
Need help collecting 10–12 months of X/Twitter data for an ML sem project
Hi everyone,
I’m student working on my Machine Learning semester project.
I want to build a sentiment analysis system using X (Twitter) data. The idea is on particular, collect relevant public posts from around the last 10–12 months, preprocess the text, and then apply ML algorithms such as Logistic Regression, Naive Bayes, Random Forest, Decision Tree, and KNN to classify sentiment.
I’m currently stuck at the data collection stage. I’m new to X’s API and web data collection, and after reading X’s current policies, I understand that browser-based scraping/automation of X is not allowed, so I want to find a legitimate approach.
Could anyone with experience in X/Twitter data collection help me understand:
- Are there legitimate datasets or tools that researchers commonly use for this type of project?
- If you've done a similar sentiment-analysis project, what approach did you use?
I’m not asking anyone to do the project for me. I mainly need guidance on how to legally and practically obtain the historical dataset, so I can handle the preprocessing, ML models, evaluation, and analysis myself.
Any advice or resources would be really appreciated. Thanks!
r/learnpython • u/Butterchicken_coke • Sep 25 '26
I have learnt the python basics and i am comfortable enough with concepts like loops, conditional statements , recursions etc. I want to practice more questions ranging from easy to difficult . Please suggest any sources 🙏🏻
r/learnpython • u/James-w07 • Sep 25 '26
I'm still learning Python, and what has helped me most so far is not trying to jump straight into big projects.
I started by understanding the basic syntax, then wrote small programs and solved simple coding problems. After getting comfortable with that, I started working on a small project that was actually useful to me.
For me, that made things click much more than just watching tutorials.
How did you learn Python? Did you follow a similar path, or is there something you wish you had done differently when you started?
r/learnpython • u/Impossible-Ear-8606 • Sep 25 '26
Ê mn ơi có app nào học python hiểu quả mà frê k ạ
r/learnpython • u/Wrong_Recipe • Sep 24 '26
I've taken a long hiatus (3+ years) from programming. I'm 20 now, and I'm looking to get back into it.
What are some things I should try doing to get back into the groove?
r/learnpython • u/JohnRT54 • Sep 24 '26
Sorry if this is a dumb question, but what am I doing wrong here?
I have defined a function
#statuscheck.py
def statchk(n):
layoutx = [[sg.Text('Debug point')],
[sg.Output(key='-OUTPUT-', expand_x=True, expand_y=True)],
[sg.In(key='-IN-', expand_x=True)],
[sg.Button('Go'), sg.Button('Close')]]
winx = sg.Window('Where I am now', layoutx, auto_close=False, grab_anywhere=True, resizable=True, location=(0,0),return_keyboard_events=True, auto_size_text=True)
while True:
event, values = winx.read()
if event == sg.WIN_CLOSED:
break
if event == 'Go':
print("Here at ",n)
if event == 'Close':
break
I import it, but when I call it, it doesn't run, and I can't see any error messages. The call is:
statuscheck.statchk(1)
I know it's something simple I'm overlooking. Thanks.
r/learnpython • u/MuchRandomGuy • Sep 24 '26
Hello, I’m currently learning Python from scratch and I’m looking for a good YouTube course/channel to follow.
I’m mainly looking for someone who explains things clearly and doesn’t rush through the basics. I want to actually understand Python rather than just copy code.
Who would you recommend for a complete beginner? If possible, please share the YouTube channel or specific playlist/course you learned from.
Thanks!
r/learnpython • u/Ayrton110 • Sep 24 '26
Hi guys, I hope ya'll are good, thank you. I am struggling with this problem for weeks now. I get the answer, but still get "out of range". I know with "banana" this would work because of a technicality. Is there anyway for this work without the error?
fruit = "apple"
index = - 1
while index < len(fruit):
letter = fruit[index]
print (letter)
index = index - 1Any input or advice is appreciated. Thank you for taking the time to read my post here.
Edit: Sorry, intended answer is "elppa"
I get this
e
l
p
p
a
IndexError: string index out of range
r/learnpython • u/zaphodikus • Sep 24 '26
I am On windows and have 3.13 installed
python --version
3.13.14
where python returns
C:\Program Files\Python313\python.exe
C:\Users\conrad.braam\.pyenv\pyenv-win\shims\python
C:\Users\conrad.braam\.pyenv\pyenv-win\shims\python.bat
I hate that visual studio has this shim, but I am ignoring the shim. (Yes that is me, it's no secret)
My path is correct, but there is no pyinstaller.exe in /scripts
python -m PyInstaller -v shows it's installed because it prints out a nice result
python -m PyInstaller -v
6.22.3
So I guess I could maybe fix my script to call python -m Pyinstaller somescript instead of just calling python somescript I'm just puzzled why is the package not installed correctly as a global package?