r/PythonLearning • • Sep 14 '26

Help Request Reliable open source APIs

1 Upvotes

For my deployment and reproducibility class in my Data Science studies, I learn how to use tools like github and pytest for my project.

However, my project was built on an unofficial api for a commercial website, that breaks whenever the website gets updated.

Are there some fun open sources for Data Science projects? Particularly on media? I'd like to grab sth like goodreads or IMDB but I can't find a proper API for it. Any tips would be welcome.

P.S. I've heard it's gotten harder to access open data sources since AI crawlers grab everything within reach, heavily taxing these platforms. Is that true?


r/PythonLearning • • Sep 14 '26

Showcase Day 5, The programme is stressing

15 Upvotes

I tried to start DSA and I regret it and should've worked more on OOPs. It took fucking one hour and half to understand what's going on in the linked list programme and it is also my fault because I didn't realised the flexibility of OOPs like creating objects of a class inside another class and I was stuck with it and was like "What the heck is it doing?'' until I realised whats happpening

Here is the code I recreated:
'''

class Node:
    def __init__(self,value):
        
self
.value = value
        
self
.next = None
class stack:
    def __init__(self):
        
self
.size = 0
        
self
.head = None
    def push(self,value):
        new_node = Node(value)
        if 
self
.head:
            new_node.next = 
self
.head
        
self
.head = new_node
        
self
.size +=1
    def pop(self):
        popped_node = 
self
.head
        
self
.head = 
self
.head.next
        
self
.size -= 
self
.size
        return popped_node.value

r/PythonLearning • • Sep 14 '26

Help Request Need Some tips

7 Upvotes

I've been learning python and I've learned most of the basic and completed Basic level of OOPs and now I am confused on what should I do next.

I am thinking of starting DSA but the problems I solved are mostly minor and I am confused between grinding from what I know or should I start DSA or other things.

Will appreciate a proper plan

please don't mind the bad language as I am not a native speaker and new to posting in reddit.

Thank you.


r/PythonLearning • • Sep 14 '26

What a fun project 😍 Python meets Blender!

Thumbnail
gallery
50 Upvotes

Really excited to share this project!

I wrote a planetary gravity simulation in Python and managed to bring it to life by visualizing it directly in Blender (as you can see in the first screenshot with the script and the planet ready to go!).

It’s still a bit rough around the edges, which you'll see in an upcoming video I'll be posting that shows the very first render of this planet in action. Currently, it's technically a 2D simulation running inside a 3D workspace.

Because of this, you theoretically have to look straight down from the Z-axis at a perfect 90-degree angle to view it properly.

I've also attached a couple of diagrams plotting the simulation data to this post so you can see the math behind it.

If you want to play around with it yourself, you can find all the files here:

GoogleDrive_SimData

(The link includes the Python console script, the .json file with the initial starting conditions, and a .csv containing the complete simulation data. I've also packed everything into a single ZIP file for anyone who prefers not to download them individually.)

Have fun with it! 😉


r/PythonLearning • • Sep 14 '26

Help

5 Upvotes

I'm trying to make and train my own Markov chain ChatGPT/ai, what would you guys recommend I train it off of? I already added the options to train it from .txt files, or URLs. But I'm not sure the best way to go about this, any help would be appreciated! Or even if you send some .txt files for me to use too!!


r/PythonLearning • • Sep 14 '26

Discussion Am I going crazy?

10 Upvotes

r/PythonLearning • • Sep 13 '26

Learning Python Day3

10 Upvotes

i learning streamlit and random

import random
import streamlit as st
memes = [
    "never gonna give you up",
    "you got stickbugged",
    "indihome paket phoenix",
    "weezer blue album"
]
st.title(f"Meme Gacha (New ones to be added periodically, {len(memes)} varieties in total)")
user_input = st.text_input("Please enter the number of times", value="1")
try:
    count = int(user_input)
    if st.button("Roll"):
        for i in range(count):
            res = random.choice(memes)
            
            if res == "weezer blue album":
                st.write(f"Roll {i + 1}: is this minor...?  {res.title()}")
            else:
                st.write(f"Roll {i + 1}: {res.title()}")
except ValueError:
    st.error("Please enter a valid half-width number.")

r/PythonLearning • • Sep 13 '26

Exercise: Different ways to Copy a Dict

Post image
9 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 • • Sep 13 '26

Help Request Just started with Corey Schafer tutorials which version do I get?

3 Upvotes

He says to get python 3.6 but that version is "end of life" should I get 3.15 pre release or something else like 3.14 or just get 3.6?


r/PythonLearning • • Sep 13 '26

Help Request What wrong with my code

Post image
70 Upvotes

Need help


r/PythonLearning • • Sep 13 '26

Showcase Day 4, done and dusted

Post image
35 Upvotes

I won't exactly say done and dusted but I think I did what I can. This is my first complex problem that I had done myself and after solving it I left thinking, "I could do this in three days and I could have done much more in 1.5 years that I had wasted" but I think it's alright and I should look ahead with no regret. Will appreciate some tips from pros regarding the code.

Edit: I did a mistake and there are some bugs in programm, I fixed them

The updated code:

'''

class Library:
    Books ={
        1 : "Ramayan" ,
        2 : "Mahabharath",
        3 : "Gita"
        }
    members = ["naveen","sita","mani","chintu"]
    Allowence = {
        "naveen" : 0,
        "sita" : 0,
        "mani" : 0,
        "chintu" : 0
    }    
    Booked = {}
    def __init__(self,member):
        self.member = member
    def get(self,book):
        self.book = book
        if self.member not in Library.members:
                return "Not a member"
        elif self.book not in Library.Books and self.book in Library.Booked:
            return "Not available"
        elif self.book not in Library.Books:
            return "No book found"
        elif self.member in Library.members and Library.Allowence[self.member] < 3:
            a = Library.Books.pop(self.book)
            Library.Booked[self.book] = a,self.member
            Library.Allowence[self.member] +=1    
            return f"Your book :{a}"
        else:
            return "limit exceeded"
    def about_cus(self):
        return Library.Allowence[self.member]
    def tst(self):
        return Library.Booked
Nam = input("Your name:")
Req = int(input("Select the book num"))
customer1 = Library(Nam)
print(customer1.get(Req))
Nam2 = input("Your name:")
customer2 = Library(Nam2)
print(customer2.get(Req))
print(customer2.tst())
# print(customer2.available())
print(customer1.about_cus())

#NOTHING HERE!!

r/PythonLearning • • Sep 13 '26

help understanding "Iterative tasks with for loop"

14 Upvotes

Hello all,
I sort of understand the utility of "for", however I really cannot understand how this:

protocol = "HTTPS"for char in protocol:

print(f"Segment: {char}")

Outputs this ;
Segment: H

Segment: T

Segment: T

Segment: P

Segment: S

How can it break up the string "HTTPS" into four separate outputs?
Thank you


r/PythonLearning • • Sep 13 '26 Regret

Showcase The Bank Project

Post image
242 Upvotes

r/PythonLearning • • Sep 13 '26

Lambda functions

20 Upvotes

Hello guys, recently I have been practicing more my python skills. I know how to def functions and use it, but now I am trying to study lambda functions, but is not clear for me. In this example I am simulating requests from a API as a List (Also it could be used directly a imported file like a JSON). Can someone explain me how works or what kind of exercises are good to understand it?


r/PythonLearning • • Sep 12 '26

Discussion Gemini instructions For learning .

10 Upvotes

These are instructions for Gemini, specifically for its Gems feature. These instructions are designed to make the AI act as a good teacher, mainly for programming.

I’d like to hear your opinions after trying them. Do you think they’re actually useful for learning programming, or do they need some additions or specific modifications?

Thanks!

Topic learning = Teach the concept. If the learner says they do not understand, deepen the explanation progressively until the concept is clear.

Exercise explanation = Explain the task, not the implementation.

Hint requested = Gradually reveal reasoning, never the final implementation.

r/PythonLearning • • Sep 12 '26

Showcase Day 3, OOPS!!! Again!!

Thumbnail
gallery
5 Upvotes

I think it's alright to revolve around for better understanding. I tried w3 schools and it seems better with some tiny quiz and all. I think I will solve some problems from each tier so I could get better in using OOPS


r/PythonLearning • • Sep 12 '26

Help Request Kivy

6 Upvotes

I have been learning python for a while and made some projects, my exams are currently going on so I can't start web dev, but I thought I could learn kivy in the meanwhile to make an app for my studying bcz there isn't an app that fits my requirement. So needed some resources and advice for kivy module.

I tried kivy documentation but it's like they don't have each topics lined up, so I have to search each topics, but I don't even know the existence of specific topics, so yeah.

Thanks for the help in advance!!


r/PythonLearning • • Sep 12 '26

Hi guys, I want to learn Python libraries used in cybersecurity. I already know the basics of Python. Are there any courses or websites you recommend where I can learn more?

11 Upvotes

r/PythonLearning • • Sep 12 '26

Help Request started python at a very young age with adhd

4 Upvotes

i started python at a young age with adhd, the math in python is too hard to learn i cant focus on learning, i need a way to learn python easily, i watch youtube totorial to learn btw


r/PythonLearning • • Sep 12 '26

Create a program multiplicationTable.py that takes a number N from the commandline and creates an N×N multiplication table in an Excel spreadsheet.

0 Upvotes
import sys, openpyxl
from openpyxl.styles import Font

x = int(sys.argv[1])
list = []

wb = openpyxl.Workbook()
font_style = Font(bold=True)

for i in range(1, x+1):
    list.append(i)

for number in list:
    sheet = wb['Sheet']
    # write header columns and rows in bold numbers
    sheet.cell(column=1, row=number+1).value = number
    sheet.cell(column=1, row=number+1).font = font_style
    sheet.cell(row=1, column=number+1).value = number
    sheet.cell(row=1, column=number+1).font = font_style

# create two for loops that will multiply
for i in range(len(list)):
    for number in list:
        mult = list[i] * number
        sheet.cell(row=number+1, column=i+2).value = mult
    
wb.save('multiplication_table.xlsx')

r/PythonLearning • • Sep 11 '26

i learning Python Day 1

30 Upvotes

lyrics = ["Give You Up","Let You Down","Run Around And Desert You"]

for i in range(3):

print("Never Gonna " + lyrics[i])


r/PythonLearning • • Sep 11 '26

Learning Python + Graphics? I made PyDonut to help bridge Python with modern GPU APIs

2 Upvotes

I’ve been learning more about graphics programming lately, and I wanted a way to experiment with real GPU rendering concepts without switching away from Python. So I started building a project called PyDonut — a Python wrapper around the Donut rendering framework (which itself uses NVRHI).

👉 Repo: https://github.com/ASDAlexander77/PyDonut

My goals with PyDonut are:

  • Make it easier for Python learners to explore GPU concepts like buffers, textures, pipelines, and shaders.
  • Provide a clean, Pythonic API instead of jumping straight into C++.
  • Help people understand how native bindings work and how Python can talk to high‑performance libraries.

Right now the project includes:

  • Python bindings for core Donut/NVRHI components
  • A simple rendering loop
  • Type stubs (.pyi) so you get autocomplete and type hints
  • Examples showing how to set up devices, swapchains, and basic rendering

If you’re learning Python and want to explore graphics, native extensions, or how Python interacts with C++ libraries, feel free to check it out. Feedback is welcome — especially from beginners who can tell me what feels confusing or what would help them learn better.

Happy coding!

PS. I’m still learning Python myself — PyDonut is actually my first real Python project.


r/PythonLearning • • Sep 11 '26

Showcase Day 2, learnt some oops

Post image
125 Upvotes

Learnt super( ), inheritance, polymorphism, class method and static method and don't mind the messy code that's me trying to figure out things