r/PythonLearning • • 1h ago

Can't lock in

4 Upvotes

I am a 22 year old currently learning python but after learning the basics and trying to build small projects I will forget the basics. Like I get confused, where to apply certain functions...etc. is there any way I can fix that .

Also i can't lock in i eventually get stuck in this instgram or reddit loop for hours

Can you guys give me some advice


r/PythonLearning • • 7h ago

30 Python concept based Interview Questions - Free PDF Doc

Thumbnail
github.com
8 Upvotes

Hi All,

I have consolidated my 30 python interview Q&A series into one PDF Doc and added in my github python repo.

File link : https://github.com/grasspacad07/grassp_python/blob/main/Python_Interview_Guide_30_Questions.pdf

This covers most of the topics asked in beginner to intermediate python interviews. You could expect similar question patterns generally. Keep it handy for quick revision.

Thank you! Happy learning and coding :) All the best !


r/PythonLearning • • 7h ago

An Assignment Reminder

2 Upvotes

Recently made another project again, this time I'll actually use cause I keep forgetting to do my work on time. But basically, it's like Google Calendar and will help automatically remind you of what work is due. It also stores data via JSON files or SQLite, depending on which script you run; more details in the README.

https://github.com/F11Fii/Task-Scheduler

Looking for suggestions on how to improve it as well :3


r/PythonLearning • • 5h ago

Help Request why do i get typeerror 'nonetype' object is not subscriptable

1 Upvotes

i'm doing a small practice exercise where i read a csv of my course scores with the csv module and work out the average for each subject. the numbers came from the printout our teacher pins outside the classroom each term, which i typed into a spreadsheet at home so i'd stop adding them up by hand.

import csv
def average(nums):
    total = 0
    for n in nums:
        total = total + n
    avg = total / len(nums)
    stats = {"avg": avg, "count": len(nums)}

with open("scores.csv") as f:
    reader = csv.reader(f)
    for row in reader:
        subject = row[0]
        scores = [int(x) for x in row[1:]]
        result = average(scores)
        print(subject, result["avg"])

Traceback (most recent call last): File "test.py", line 15, in <module> print(subject, result["avg"]) TypeError: 'NoneType' object is not subscriptable

i printed the intermediate variables and the score list and the running total both look fine, ran the function by itself in a separate file, and read the docs page on defining functions. none of that showed me what was wrong.

am i right that i just left out a return inside the function, or is something else in there broken too? thanks


r/PythonLearning • • 17h ago

Hello everyone, in your opinion, what is the best programming project for someone starting at an intermediate level in Python?

Post image
8 Upvotes

r/PythonLearning • • 11h ago

Help Request Where & how to learn python?

2 Upvotes

I'm new in python I don't know where to start and what to learn I have listened that only 20% of python is necessary my goal is AI & ML.


r/PythonLearning • • 9h ago

I built Pyzzel: A lightweight PostgreSQL ORM for Python with SQLAlchemy-like syntax and performance close to raw Psycopg 3

0 Upvotes

Hi everyone,

I've been building Pyzzel, an open source ORM for PostgreSQL. I wanted something with SQLAlchemy's familiar feel, but simpler and closer to raw psycopg speed.

What it does

  • Active Record style: models own short sessions per operation, so there's no long-lived session to manage
  • Own SQL builder on top of psycopg and psycopg_pool
  • select() returns plain rows and get() returns objects
  • Relations and joins
  • Built-in migrations (generate, apply, status, check for drift, pull from the DB)
  • Base.transaction() shares one connection across models, with nested blocks as savepoints
  • Hidden version column for safe updates, and save() updates only changed columns
  • Core code uses only the standard library, and a plain pip install gets everything

Example

python

users = User.select(User.name, User.age).where(User.id == 1)
user = User.get(1)
with Base.transaction():
user.age = 30
user.save()

Why PostgreSQL only? Focus. Supporting one database well beats supporting five badly.

Status: Early stage, with 250+ tests passing against a real PostgreSQL. Feedback, issues and criticism are very welcome, especially on the API design.

GitHub: https://github.com/himanshubokde21/Pyzzel

PyPI: https://pypi.org/project/Pyzzel/

Happy to answer any questions!


r/PythonLearning • • 1d ago

Showcase Database prototype (python)

Thumbnail
gallery
226 Upvotes

I write my first data base code handling a class record using list tell me how is it..

First two are code and the rest is the output.

Tell me if anything can be improve or added to make this code even more practical.


r/PythonLearning • • 8h ago

Learning Python? Looking for 20 people to try a free personalized Python course

0 Upvotes

Hey everyone!

We’re working on a different approach to learning Python, where the course adapts to what you already know, your learning pace, and the topics you struggle with, instead of making everyone follow the same fixed curriculum.
We’re looking for 20 people who are currently learning Python or want to get started.

The course includes:

  • Structured lessons and practical coding exercises
  • Personalized learning paths based on your existing knowledge
  • Adaptive assessments based on your progress
  • AI-assisted learning support when you get stuck

Participation is completely free, with no payment or purchase required. This is an beginner friendly course.

We’ve developed this course through LearnStride and are genuinely interested in understanding whether this approach makes learning Python easier and more effective.

All we ask in return is honest feedback about your learning experience - what works, what doesn’t, and what could be improved.

If you’re interested, please leave a comment or DM me your email address so we can send you an invitation to access the course.

Thanks!
Posted with moderator permission.


r/PythonLearning • • 1d ago

Removing while iterating over a list

Post image
24 Upvotes

An exercise to help build the right mental model for Python data.

The “Solution” link uses memory_graph to visualize execution and reveals what’s actually happening.


r/PythonLearning • • 1d ago

School Python vs Modern Python 🤯 | If-Else vs NumPy #Shorts

Thumbnail
youtu.be
0 Upvotes

Interesting python problem


r/PythonLearning • • 2d ago

Help Request Complete beginner here: where should I start learning Python?

29 Upvotes

I want to learn Python but don't know where to start!

Hi everyone. I'm a complete beginner and I want to learn Python, but I'm not sure where to begin. There are so many courses and videos that I feel lost.

Could you recommend a course or a step-by-step path for someone starting from zero? Free cost resources are preferred.

Thanks a lot!


r/PythonLearning • • 1d ago

Beginner struggling with web scraping multiple Wikipedia pages using BeautifulSoup in Spyder

6 Upvotes

Hi everyone!

I'm fairly new to Python and currently learning web scraping using Spyder, BeautifulSoup, and requests.

I've been trying to write a script that extracts data from a Wikipedia table, collects the links from the table, and then visits each link to scrape the corresponding Wikipedia article.

I've managed to get some parts working, but I'm struggling to figure out whether my approach is correct and if there are any mistakes in my code.

I'm particularly unsure about how I'm extracting the links and downloading the individual pages.

I would really appreciate some guidance on how to troubleshoot this or improve my approach.

I'm not looking for someone to write the code for me, just some explanations or pointers so I can understand what I'm doing wrong.

Thanks in advance!

here's the code:

import requests

from bs4 import BeautifulSoup

import os

import time

from urllib.parse import urljoin

import pandas as pd

headers = {

"User-Agent": "AcademyAwardsStudentProject/1.0 (educational research)"

}

resp = requests.get(

"https://en.wikipedia.org/wiki/List_of_Academy_Award%E2%80%93winning_films",

headers=headers,

timeout=30

)

resp.raise_for_status()

soup = BeautifulSoup(resp.text, "html")

table_list = soup.find_all("table")

print(len(table_list))

for index, table_name in enumerate(table_list):

if "Film" in table_name.text:

print(index, table_name)

class_name="wikitable"

table_list = soup.find_all("table", class_=class_name)

#print(len(table_list), *[i.text for i in table_list])

for table in table_list:

if "Film" in table.text and "Nominations" in table.text:

table_data = table

break

table_headers = table_data.find_all("th")

column_headers = []

for header in table_headers:

column_headers.append(header.text.strip())

table_row_data = []

for row in table_data.find_all("tr"):

individual_data = [i.text.strip() for i in row.find_all("td")]

if individual_data:

table_row_data.append(individual_data)

df = pd.DataFrame(table_row_data, columns=column_headers)

df.to_csv("academy_awards.csv", index=False)

#Create a folder for the movies

output_dir = "movies"

if not os.path.exists(output_dir):

os.makedirs(output_dir)

#Find the links to each movie

links = []

for row in table_data.find_all("tr"):

cells = row.find_all("td")

if cells:

link = cells[0].find("a", href=True)

if link:

links.append(urljoin(resp.url, link["href"]))

links = list(dict.fromkeys(links))

print("Number of movie links: ", len(links))

#download each movie's Wikipedia page

for index, url in enumerate(links):

name = url.split("/")[-1]

try:

print("Getting movie: ", name)

response = requests.get(url, headers=headers, timeout=30)

if response.status_code == 200:

with open("movies/" + name + ".html", "w", encoding="utf-8") as f:

f.write(response.text)

else:

print("Failed to download: ", url, response.status_code)

time.sleep(5)

except requests.exceptions.RequestException as e:

print("A network error occured:", e)


r/PythonLearning • • 1d ago

Help Request Need help planning foray into Python

9 Upvotes

I am a mid level executive who has recently been asked to take over a python intensive project. I have coding experience but have been out of touch since last 10 years.

My question is that the project leverages heavily pandas, numpy, and matplot. I need to start in a month and want to use the lean december to be in a position where i can get hands dirtier

Should i start with CS50 (as suggested on other forums ) and gradually get into pandas and others. Or can i directly start with those ?

Ps: new to python, so dont bombard me with “stupid question” alerts !!


r/PythonLearning • • 1d ago

promoting the Python programming language through practical examples?

0 Upvotes

What do you think of my efforts to promote the Python language?

Most recently, I’ve been working on an ARM-based system using the Pydroid3 IDE.

Do you know of any other Python-related promotional initiatives for the Python community?


r/PythonLearning • • 2d ago

Getting past the beginner level!

16 Upvotes

Helloooo ! I need to know howw do we actually get past the beginner level like after learning the basics ... I can't get ideas and like everything is available already what else do I even build ... I need helpp


r/PythonLearning • • 1d ago

Hello, I recently joined the Reddit platform and I am a beginner in Python. I designed a program that is literally a calculator. I am not an average beginner, maybe, and I would like your opinion on the program and another idea to create another program (it took me an hour to create this calculator)

Thumbnail github.com
2 Upvotes

r/PythonLearning • • 1d ago

1st year CS student learning Python. Need advice on resources, laptop ($400-600), and languages

3 Upvotes

Hi everyone, it's my first time here and I really need your help and advice. I'm currently a 1st-year university student majoring in Computer Engineering, and right now we are learning Python.

​What would you recommend: where can I learn Python for free, and is it worth reading programming books right now? In the future, I want to learn how to write code for games and create my own apps. I also want to buy a laptop with a budget of $400–600 that will last me a long time.

​And one last question about languages: my English is currently weak, around A1–A2 level — should I focus on learning English right now, or is it more profitable in IT to start learning Chinese instead? If you have any other advice or directions on where it's better to move forward, I'd be really glad to hear it.

​(P.S. I didn't write this text in English myself — I translated it using AI, because as I mentioned earlier, my English isn't very good yet).


r/PythonLearning • • 1d ago

Complete Beginner

1 Upvotes

I want to start learning Python, and I need advice on what topics to focus on and the best resources or platforms to learn from.

I'm also interested in pursuing Artificial Intelligence and Machine Learning in the future, so I'd appreciate guidance on what I should learn, the skills I'll need, and how to build a strong foundation in those fields as well. 🙏


r/PythonLearning • • 1d ago

Building a Free Automated Video Production System on a Broken Laptop with Limited Hardware 🥺

Thumbnail
gallery
0 Upvotes

Hi everyone!

I want to share a personal project I've been working on.

I'm building an automated video production pipeline using Python and free/open-source technologies.

Here's something that makes this project particularly challenging:

I don't have a proper desktop computer. I'm working with a laptop that has a damaged display and very limited hardware resources.

Despite these limitations, I'm trying to build a system that can automate the video production process:

Script and timeline generation

HTML/SVG-based animations

Browser-based frame rendering

FFmpeg video processing

Full HD 1080p video output

My goal is to create cinematic-style videos without depending on expensive AI subscriptions.

I'm still developing and testing the system. It's not a finished product yet.

I know my hardware is far from ideal, but I believe creativity and determination shouldn't depend entirely on expensive equipment.

If you were in my position, what would you focus on to make this pipeline more efficient on low-end hardware?

I'd genuinely appreciate technical advice and feedback.

Thanks for reading! ❤️


r/PythonLearning • • 2d ago

Best project for learning python

40 Upvotes

I am not a beginner but i want to learn news things


r/PythonLearning • • 2d ago

What help you learn Computer networking?

12 Upvotes

I am learning networking and beginning to get into the introductions of the concept. I've looked at YouTube videos and articles on the matter, and I always was aware of how python and networking goes together, but I don't understand what material to educate myself on when it comes to getting into networking what help you understand networking?


r/PythonLearning • • 3d ago

I am 15 and this is my python project

Thumbnail
gallery
51 Upvotes

Hi everyone!

I recently built a Python project called Lived Here.

The idea is simple: enter your birth date and the program turns it into a storytelling experience. Instead of only showing your age, it analyzes your date of birth and shows things like:

• How long you've lived in years, days, and seconds
• Your zodiac sign
• Days until your next birthday
• Historical events from your birthday
• Pop culture highlights from that day
• Interesting birth-date facts
• Inflation estimates since you were born

I started it as a fun experiment, but it gradually evolved into a slide-based experience inspired by modern storytelling websites.

I'm a 15-year-old student learning Python, so I'd love feedback on the code, design, and ideas for future features.

GitHub: https://github.com/coding-arnav66/Lived-Here

Thanks for checking it out!


r/PythonLearning • • 2d ago

Showcase I built a small BASIC-inspired programming language interpreter in Python — KVC-BASIC

9 Upvotes

Hey everyone!

I wanted to share a little project I've been working on recently called KVC-BASIC.

It's a simple BASIC-inspired programming language interpreter written entirely in Python. I started working on it mainly out of curiosity — I wanted to understand a bit better how programming languages actually work, so I decided to try building a small interpreter myself.

For now, KVC-BASIC supports a few basic instructions:

  • SET — assigns a value to a variable
  • ADD — adds two values
  • SUB — subtracts one value from another
  • MUL — multiplies values
  • DIV — divides values
  • OUT — prints the result

Here's a quick example of what the code looks like:

SET x 10
SET y 5
ADD x y
OUT x

The project runs on Python 3 and doesn't require any external libraries.

You can check it out here:
https://github.com/FranekKvcux/KVC-BASIC

It's still a work in progress, and I know there's plenty of room for improvement. I'm sharing it because I'd genuinely like to hear what others think.

Do you have any suggestions for features I could add or things I should improve? I'd also love to hear your thoughts on the overall idea.

Thanks for taking the time to check it out!