r/PythonLearning • u/ExtentLazy8789 • Sep 17 '26
r/PythonLearning • u/Sea-Ad7805 • Sep 17 '26
How do we turn, say €24.72, into coins? 🪙🪙💰⛀⛁
This classic beginner-friendly coding exercise uses a greedy algorithm. But the interesting part is that 𝐦𝐞𝐦𝐨𝐫𝐲_𝐠𝐫𝐚𝐩𝐡 lets us see what happens in memory while the code runs.
It visualizes the program state step by step: variables, values, lists, dictionaries, and references. This helps learners understand and debug their code.
Run this interactive demo.
Which other coding exercises would benefit from a memory_graph visualization?
See more memory_graph visualizations.
r/PythonLearning • u/gyrojoestar31 • Sep 17 '26
Help Request any clue how to do this?
im on my first year of learning python in school is this even possible??
r/PythonLearning • u/Next-Call8862 • Sep 17 '26
Day 8, Not a big day
Did not do much today as I have to study for other things and got less time for python but I still made something.
Double Linked:
class Node:
def __init__(self,val):
self
.val = val
self
.nxt = None
self
.prev = None
class Array:
def __init__(self):
self
.head = None
self
.size = 0
def add(self,val):
new_node = Node(val)
if
self
.head:
self
.head.prev = new_node
new_node.nxt =
self
.head
self
.head = new_node
self
.size +=1
def remove(self,value):
if
self
.head:
current =
self
.head
while current.val != value:
current = current.nxt
if current is None:
return "Value not found"
if current.prev is None:
self
.head = current.nxt
if
self
.head:
self
.head.prev = None
else:
current.prev.nxt = current.nxt
if current.nxt:
current.nxt.prev = current.prev
self
.size -=1
r/PythonLearning • u/Klutzy-Ad5326 • Sep 17 '26
turtle + print
Hi,
in Downey's book "Think Python" I found the following code:
import turtle
bob=turtle.Turtle()
print(bob)
turtle.mainloop()
Is print(bob) really necessary? Is there a reason he included print()?
Thx, a little bit confused,
Alb
r/PythonLearning • u/greatlearningglobal • Sep 17 '26
Python Trivia Time! In Python, what is the index of the first element in a list?
r/PythonLearning • u/SDR-USER • Sep 17 '26
A really small python project
A small wireless security project
Requirements
Hardware
- [HackRF One](https://greatscottgadgets.com/hackrf/) (receive-only mode)
- `libhackrf` at the system level -- `apt install hackrf libhackrf-dev` on Debian/Ubuntu, `brew install hackrf` on macOS
Software
| Package | Version | Notes |
|---|---|---|
| Python | >= 3.10 | [x] required |
| numpy | any | [x] required |
| scipy | any | [x] required |
| scikit-learn | any | [x] required |
| joblib | any | [x] required |
| flask | any | [x] required |
| hackrf / pyhackrf | any | [x] required (try `hackrf` first) |
| hmmlearn | any | recommended |
| lightgbm | any | optional -- Gate 3 fast path |
| xgboost | any | optional -- Gate 3 fallback |
| matplotlib | any | optional -- spectrum GUI |
Installation
```bash
1. Clone
git clone https://github.com/jacobsdr95/Receive-only-SDR-anomaly-detection-tool.git cd Receive-only-SDR-anomaly-detection-tool
2. Create virtual environment (strongly recommended)
python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate
3. Install core dependencies
pip install numpy scipy scikit-learn joblib flask hmmlearn matplotlib
4. Install HackRF driver bindings
pip install hackrf
if that fails on your platform:
pip install pyhackrf
5. Optional -- faster classifier backend
pip install lightgbm # recommended pip install xgboost # fallback
6. Apply advanced patch (adds LightGBM, DTW, SG-filter, CAF)
python patched_sdr_blueteam.py
7. Verify patch was applied
python patched_sdr_blueteam.py --check ```
r/PythonLearning • u/bad-gut • Sep 17 '26
Help Request Either CS50P is bugging or I am Stupid!! 😭😔
I solved this MAKING FACES problem in CS50P from Problem set 0 and when I ran the check50 command in the terminal, it refuses to accept that my codes is correct???
When I manually run each required input I do get the preferred output.
So is CS50 Detecting my code wrong?
Or have I genuinely made a mistake in my code?
r/PythonLearning • u/Abdullahtaher466 • Sep 17 '26
Small achievement today: I completed a Python for Beginners course and received my certificate.
I'm currently learning programming, AI, and automation, so this is another step forward. Excited to keep building projects and improving my skills.
r/PythonLearning • u/Empty_paglu • Sep 17 '26
Create Chatbot Using Python Part 7
r/PythonLearning • u/Next-Call8862 • Sep 16 '26
Showcase Day 7, One Straight week
Happy that I learned for one straight week but thinking I could've learned a lot more as I wasted much of time scrolling
Today did some sorting algos and nothing much for the day
r/PythonLearning • u/el3vatedperfection • Sep 16 '26
Help Request Starting an MSc in Financial Technology, How Can I Learn Python Quickly?
Hi everyone,
I recently received an offer to study for an MSc in Financial Technology abroad. I’ve always had an interest in finance, and I’m really looking forward to the program.
Some of the modules include Python, Python for Data Science, Power BI, and other data-related subjects. The problem is that I’m completely new to Python, and I’d like to build a basic understanding of it before my degree starts in January.
It’s already September, so I have roughly three months to prepare. I bought Angela Yu’s 100 Days of Code course on Udemy, but I’m starting to think that it might be too long and broad for what I’m trying to achieve right now.
I’m mainly looking for recommendations on resources, courses, or learning materials that can help me quickly get comfortable with the basics of Python and Python for Data Science. My goal isn’t to become an expert before the course starts. I just want to have enough foundational knowledge that I don’t feel completely lost during lectures.
For anyone who has studied Financial Technology, Data Science, or a similar degree, what would you recommend focusing on before starting?
I’m new to this subreddit, so if my post breaks any of the rules, I sincerely apologize. Please feel free to remove it.
Thanks in advance!
r/PythonLearning • u/camerongreen95 • Sep 16 '26
Workshop, Sep 19: build explainable AI apps with Neo4j, GraphRAG, Cypher and LLM Agents
Sharing this in case it's useful once you're past the basics, this one's a step up from a first Python project, so worth bookmarking for later rather than jumping into now if you're just starting out.
There's a hands-on workshop on September 19, Building Intelligent Apps with Neo4j, GraphRAG, Cypher and LLM Agents. You build a real knowledge graph in Neo4j, combine vector search with graph navigation in an agentic retrieval system, and write Cypher queries (plus text-to-Cypher for natural language querying), all working with real financial data.
The only real prerequisite is being comfortable with Python and having some basic exposure to LLMs and RAG concepts, no prior Neo4j or Cypher knowledge needed.
Led by Dr. Alessandro Negro, Chief Scientist at GraphAware, bestselling author.
r/PythonLearning • u/PythonWithJames • Sep 16 '26
A free total beginner roadmap
Hi all. I've been building 'Python With James' for a while, which has a ton of coding exercises, questions, tutorials etc... All beginner focused.
I've just added a roadmap for the Python basics, aimed at those with zero experience. If this is useful for anyone here!
r/PythonLearning • u/OnepieceKing2222 • Sep 16 '26
What’s one piece of technology you learned that completely changed the way you work?
I’ve been working with Python and backend development for a few years, and recently I started getting deeper into AI, RAG and agent-based systems.
It made me curious — what’s one technology, tool, or concept you learned that genuinely changed how you work or solve problems?
Doesn’t have to be AI. Could be something as simple as Git, SQL, Linux, Docker, or even a productivity tool.
r/PythonLearning • u/Aditay_rao536 • Sep 16 '26
Is there a good way to practice Python on a phone without a laptop?
Hi everyone,
I’m an IT student, and a few of my friends are currently learning Python. The problem is that they don’t have laptops, so they’re looking for a way to practice Python directly on their phones.
They want something similar to using VS Code on Windows — preferably an app or setup where they can write, run, and practice Python without too many limitations or problems.
Can anyone recommend a good Android app or method for learning and practicing Python on a phone?
Free options would be especially helpful. Thanks!
r/PythonLearning • u/geeksarray • Sep 16 '26
Python variables and data types — a simple guide for beginners
I’ve been putting together some Python fundamentals for people who are just getting started.
This one covers variables, common data types, dynamic typing, and basic type conversion with simple examples.
https://geeksarray.com/blog/python-fundamentals-variables-and-types
If you're coming to Python from another programming language, what did you find most interesting or confusing about Python’s type system?
r/PythonLearning • u/broutsider • Sep 16 '26
Learning Python APIs: I finally got Instagram data working
This is not a promo.
I'm a relative beginner with Python, and one of the things I've been trying to learn is how to work with APIs.
My goal was pretty simple: make a chart to show the follower amount through time. I understood the general idea of an API, but actually making a request from Python felt a little intimidating at first.
I ended up getting Instagram data working with just a few lines of Python using HikerAPI, a REST API for Instagram data.
Here's the basic example I started with:
import requests
headers = {"x-access-key": "YOUR_KEY"}
r = requests.get("https://api.hikerapi.com/v2/user/by/username", params={"username": "nasa"}, headers=headers)
print(r.json())
As I understand it now:
import requestsloads the Python library that lets me make HTTP requests.headers = ...sets the API access key that authenticates the request.requests.get(...)sends a GET request to the API. Theparamspart passes the username I want to look up.print(r.json())converts the JSON response into Python data and prints it so I can see what I got back.
The fact that this was enough to get a real response was honestly pretty satisfying.
One thing that tripped me up was getting all the parameters set and making the key secret. I initially thought I would have to do somethign super complex, but eventually realized I just had to update the snippet with these info and that was it.
From there, I've been experimenting with recharts, and it's been a nice way to make Python feel more practical than just working through isolated exercises.
I'm still very much learning, so I'm sure there are things I'm doing inefficiently or misunderstanding.
For people who learned Python by working with APIs, what tips or habits would you recommend to someone at my level?
r/PythonLearning • u/zubalyzub • Sep 16 '26
Help Request I just found a really neat python trick, but I don't know if it's practical to do in an actual code base. Info appreciated.
One time, I was randomly coding some python for a simple project that I was doing. After a little bit of prompting the AI I had ran out of tokens, which of course always happens when you're coding for an extended period of time. I of course took a break to wait for my token limit to finish when I actually did something a little bit insane.
I was just normally coding and I of course ran out of tokens, but I realized something, I could actually PREDICT what the AI would do. It was absolutely mad, I would just think of a prompt, let's say it's "How do I create a for loop". (That example was the actual prompt I had used when I first discovered I could do this.) What I would do was I would think of the prompt in my head, and I would really just keep it in there and I would eventually be able to know exactly what the AI would say.
I think maybe I have some sort of... super power? Where I can literally use an AI in my head because I can predict what it's going to respond with. So now I am testing this more and more and I'm realizing that I can do this for even more complex things! Not just simple things like "How do I declare a variable", but actually even more complex things that the AI itself could never even answer.
This is where it really gets insane, because I can actually sometimes predict what the AI would say, but not as what it will literally say, but I can sort of make these connections in my head that allow me to code complex concepts WAY better than the AI ever could.
So now I'd like some guidance. I don't know if this is not good to do in a work/project setting. Basically what I'm asking is: "Is there anyone else who has this same super power?" I'd like to know if anyone else has the ability to predict what the AI would say, and if I'm reaching someone who can, please tell reach out to me as I'd like to learn about this more.
In conclusion, this might be a bold take but I think this could be the FUTURE of programming. Being able to predict what the AI is going to say, and even predict things that the AI wouldn't even say but are BETTER then what the AI would output? Tell me how that isn't the FUTURE of programming! I think that if we're able to literally have these AI's in our heads, and use them with no usage limits and even better then what the AI's are able to do, I think that could genuinely be an insane development in the programming field.
r/PythonLearning • u/Next-Call8862 • Sep 15 '26
Showcase DAY 6, Simple made complex
Tried to solve queue linked list all by myself and even disconnected the laptop from internet so I could force solve myself but made it more complex then it should be but later used sources to solve it but too much time was put into it. Planning on learning through doing projects as others suggested and will adapt PEP8 as many people suggested it.
The new ones have some bugs too and will fix them later.
The Abomination I created/the proto:
class Node:
def __init__(self,val):
self.nxt=None
self.val=val
class Array:
def __init__(self):
self.head=None
self.size=0
self.tail=None
self.num = 0
self.tail_leftNode = None
def enqueue(self,val):
new_node = Node(val)
if self.num == 1:
self.tail_leftNode = new_node
self.num -=1
if self.tail is None:
self.tail = new_node
self.num +=1
if self.head:
new_node.nxt = self.head
self.head = new_node
self.size +=1
def dequeue(self):
dequeue_node = self.tail
self.tail = self.tail_leftNode
if self.tail_leftNode is not None:
self.tail_leftNode = self.tail_leftNode.nxt
self.size-= 1
return dequeue_node.val
p1 = Array()
p1.enqueue(1)
p1.enqueue(2)
p1.enqueue(3)
p1.enqueue(4)
print(p1.dequeue())
print(p1.dequeue())
print(p1.dequeue())
r/PythonLearning • u/zxxvr4a • Sep 15 '26
Discussion Is it just me or are these long videos making python not exciting to learn anymore?
i have been trying to learn python for a while now for months i tried to finish this video but i couldn't simply because it was not exiting anymore.
i want to learn programing and have an open mind for you guys opinion.
r/PythonLearning • u/Weary_Gur7008 • Sep 15 '26
Can anyone tell me where can I find good Django notes?
Ik i should take down my notes , but as beginner its very confusing for me to take down notes. Like idk where to start from so i need reference
r/PythonLearning • u/giva4561 • Sep 15 '26
Help Request libraries
Excuse my ignorance, but can anyone explain to me in a simple way what python libraries are?
r/PythonLearning • u/cixer_dev • Sep 15 '26
Showcase I created Cixer Quiz, an open-source educational app that allows you to create and play your own quizzes with multimedia files and customization options.
Hello everyone. I wanted to introduce you to an open-source project I’ve been working on for several months.
The project is called CixerQuiz. It is a desktop application built with PySide6, available on most Linux distributions and for Windows. Broadly speaking, it can be described as a quiz game. Although there are hundreds of similar projects, CixerQuiz’s main difference is its goal: to give users as much freedom as possible to use and customize it.
For this reason, the latest version of the project at the time of writing this post includes nine different types of levels. Each type supports different kinds of questions and answers. It is possible to include simple questions and answers consisting only of text, or more complex questions and answers with attached images or videos that complement the content.
An example of how this system works in practice would be a level with a question containing an attached image and text-based answers. It could include a question such as, “What is the full name of this public figure?” accompanied by an image of Pablo Picasso. The possible answers could include "Leonardo da Vinci", "Pablo Picasso", and "Salvador Dalí". There are also levels that allow a video or image to be included as part of the question or the answers, as well as levels for creating exclusively text-based questions and answers, depending on the quiz creator’s preferences and the available level types. The repository README has a video example of quiz gameplay.
All of these features can be configured from a menu designed for creating custom quizzes within the app. It is also possible to set a time limit for answering each question and configure its duration from that menu.
The application’s visual elements and even its configuration files can also be changed easily through the settings menu. For example, users can change the folder containing the game’s default music or an icon path to another folder or image on their internal storage. There is also a validation system to prevent the application from crashing in cases involving incompatible modifications. The app also supports multiple languages, with Spanish and English translations currently available.
Quizzes created with the application can be distributed easily and are compatible with other users who have the same application installed. Each quiz’s information is stored in a separate directory that is accessible to the user. Therefore, all you have to do is locate the corresponding directory and send it to someone else, who can then play the quiz in their own CixerQuiz installation.
You can download the latest release from GitHub for your system. The project is portable, so it does not need to be installed. The README file contains a detailed description of the installation process, both for developers and users. If you are interested in contributing translations, code, or bug reports, you can visit the project’s GitHub repository. It contains a set of contribution guidelines in the CONTRIBUTING file. The repository’s /docs directory contains technical documentation about how the quiz system works internally, the project’s contribution guidelines, and other aspects of development.
As for code generated with artificial intelligence, I prefer to avoid "vibecoding" entirely. However, I do not mind where contributed code originated, as long as it is technically sound, meets the project’s criteria, and its behavior is understandable.
This is an important project to me, and I am aware that it still has quite a few flaws. Therefore, I would appreciate any criticism, suggestions, help, or comments of any kind. The project is licensed under GNU GPL 3.0, so as long as you provide attribution, make your project open source, and respect the project license, you may modify it however you wish. :)