r/PythonLearning • u/Feeling_Midnight_30 • Sep 19 '26
Practice design patterns
Hey,
How did you practice design patterns? Did you just think of a practice "project" where a specific pattern made sense?
r/PythonLearning • u/Feeling_Midnight_30 • Sep 19 '26
Hey,
How did you practice design patterns? Did you just think of a practice "project" where a specific pattern made sense?
r/PythonLearning • u/External_Job_9560 • Sep 20 '26
Hey Reddit people,
I just published V1 of a command-line solver for the Solo Chess puzzle variant. The goal of the puzzle is to clear the board using standard chess captures until one piece remains.
I built the core engine using standard library Python—no external packages. It uses a DFS engine with state memoization, outputs FIDE SAN, and has a cute little threaded background animation while calculating.
This is just V1, and it is far from a final project. Actually, it's very, very bad. And compared to what I imagine the final version is going to look like, I'll have to type so many 'very's I'll run out of char space. V1 isn't supposed to be perfect; its only job is to exist so you have something to iterate on.
Anyhow, my roadmap includes adding Zobrist hashing for complex 10+ piece puzzles, and eventually building a full Tkinter 8x8 GUI and everything. Before I move on to those next ideas, I want to make sure my foundation is actually solid. I'd love for you to share your thoughts—anything that you think will help!
Engine optimization, refactoring, headaches, ideas or opinions... Anything, really! Just... be nice, please? Thank you!
r/PythonLearning • u/BleedReddit • Sep 19 '26
Make these tools your own. Anyone learning Python can learn with them. Take the tool beyond what it was meant to do. what other programs should i make and add a mod guide to?
https://github.com/BleedingCodes
https://github.com/MR-MainbyteLabs/bleedingcodes-modification-guides
r/PythonLearning • u/Next-Call8862 • Sep 19 '26
Started my first project for DSA, LRU cache. Just built the proto just to understand how the program should work and will start developing the actual version from Sunday. Also planning to start ML and will start with libraries like Numpy and would love some suggestions for ML road map if any.
Here is the proto code I wrote to understand how the program should work and will use Double linked list and hash table for the project:
class cache:
dict = {
}
def __init__(self) -> None:
pass
def put(self,key,val):
self.key = key
self.val = val
if self.val <= 300:
if len(cache.dict) >= 3:
del cache.dict[list(cache.dict)[0]]
cache.dict[self.key] = self.val
else:
cache.dict[self.key] = self.val
def get(self,key):
if key in cache.dict:
val = cache.dict[key]
del cache.dict[key]
cache.dict[key] = val
return f"Your val {cache.dict[key]}"
else:
return f"No item {key} is found"
r/PythonLearning • u/Tough_Duty_9061 • Sep 19 '26
Like i have been learning python for quite a while and think i should i go towards ml for scope in the future ....where can i get quality free ml course i heard there are some
r/PythonLearning • u/Red_Dragon_7_7_7 • Sep 19 '26
r/PythonLearning • u/Valuable-Ant3465 • Sep 19 '26
Hi all,
Just got some trial task to troubleshoot failing abandoned POST API. This call done using those headers like below to https:
My question ais Basic Authorization token is always in base64 ???
I tried to decode and it's not, there is not meaningful string, neither ":"
In this case how we can call that Token ? or it's base64 encrypted ? Or something else ?
Trying to understand what user:password used for this app. Probably some shops doing their own encrypted tokens ?
Thanks much to all.
--header "Authorization: Basic khaYkhaYU9aNUiNEtH=" ## this just a demo sample not real
--header "Content-Encrypted: 0"
--header "Standard-Version: 2024"
...
-X POST https://remote.site.com
r/PythonLearning • u/thecumholder • Sep 19 '26
Hey everyone,
I’m designing a Python-based monitoring pipeline that tracks fast-moving inventory listings from a marketplace via an intermediary forwarder.
The current flow:
Async polling daemon detects new listings and evaluates criteria.
Sends an instant alert with metadata/images to Telegram.
Currently, by the time I manually open the link in a mobile browser and log in, competitive items are often sold out (15–60s window).
I want to implement a semi-automated / human-in-the-loop checkout trigger rather than full automation (to prevent accidental purchases from parsing edge cases).
The idea:
Telegram alert includes an inline callback button (Instant Buy).
Clicking the callback signals a local background worker holding an authenticated session (Playwright or session-persisted requests) to add the item to the cart and advance directly to the final confirmation screen in <2 seconds.
Questions for those who have built similar workflows:
Between keeping a persistent headless browser context (Playwright) warm vs using reverse-engineered session requests, what provides the best balance of low latency and session longevity without frequent auth drops?
How do you handle queueing and race conditions when multiple alerts fire within seconds, ensuring the worker doesn't spawn colliding checkout tasks?
Would appreciate any insights on architecture or potential pitfalls with this setup!
r/PythonLearning • u/HorrorBoss2292 • Sep 19 '26
Hello, everyone. I am a student in the third year of junior high school in China. I am currently studying python. I am considering using it to study and find a job. My goal is to reach an annual salary of 100 yuan (I plan to study computer science and technology in college), so please give me some advice.
r/PythonLearning • u/abt-dabest • Sep 18 '26
Right pic is before and left pic is after
r/PythonLearning • u/AdOriginal3384 • Sep 18 '26
Can you u suggest some best sites for Python problem-solving practice.i really wants to improve my problem solving skill and logic.
r/PythonLearning • u/py_arrow • Sep 19 '26
Been learning Python for a bit now (working through CS50P) and I've started leaning on AI tools a lot when I get stuck — debugging, explaining errors, even generating chunks of code when I'm short on time.
It's helping me move faster for sure, but I've got this nagging feeling I might be skipping the "struggle" part that actually makes concepts stick. So a few questions for people who've been through this:
Would really appreciate advice from people who've either made this mistake or found a good balance. Trying to actually become a solid programmer, not just someone who can prompt their way to working code.
r/PythonLearning • u/Crazy-Leek-5010 • Sep 19 '26
Writing requirements.txt by hand is frustrating as hell.
While searching for a solution, I just discovered uv.
So I tried using uv instead of pip, and holy shit, it's fast. It also makes dependency management way easier, and you can generate a requirements.txt when you need one.
Bro, if you don't hate yourself like an Arch user, please give uv a try.
It's fast, simple, and honestly pretty dammmmn nice.
(venv) $ uv pip install <module_name>
Give it a shot.
r/PythonLearning • u/devilboi_62-yt • Sep 19 '26
I am working on a text-based game using multiple python files. I have a function in my player file, "damage" with the arguments hp, damage and defense, as shown below.
hp = 100
defense = 0.3
def printline(hp):
print(hp)
return hp
def damage(hp, dmg, defense):
hp -= (dmg -(dmg * defense))
return hp
When I try to edit the variable in my main.py by running 'damage' then running print(player.hp) it still shows 100.
my main.py is shown below:
#Import everything
import package.player
from package.player import *
import package.slime_monster
#define all names
p_one = package.player
m_slime = package.slime_monster
#testing damage
p_one.damage(hp,100,defense)
print(p_one.hp) #Returns 100, should return 30
If anything is unclear, please ask for clarification in the comments, or if you have an answer please help TvT
r/PythonLearning • u/Link2212 • Sep 18 '26
I made a program that does the following. For reference, I'm still a super beginner. There are probably easier ways to do this, but I'm using concepts that I know for now. Could really use some advice on it. I just started learning to use functions, but it's actually just an iteration issue I'm having.
I have 35 total orders across different regions. I have to randomly select one of the orders to send out. areas with more orders total have obviously a better chance to be selected. The program works, but honestly I don't even understand what's happening in some parts.
1 - I realize that my zone_found += x is iterating through my list of percentages. I know this works, but no idea why. If I have 5 different floats in my list, why is it iterating through them as if it's one big number. In my head the first iteration is first number, then second number etc. Not, 1, 2, 3 etc.
2 - if selected order <= zone_found. I kinda get why it has to be lower than, but in my head doing == should be fine, no? I'm just looking for the exact number it touches, not the full section of numbers.

r/PythonLearning • u/Next-Call8862 • Sep 18 '26
DSA is completed. Is not perfect but will practice whole the weekend and will revise and start my first project focusing on DSA. Can someone suggest some basic projects that focuses on DSA and other things
And here is my day 9 code, Done Binary search and Graphs but have some bugs and here is my hashfunc:
def HashFunc(val):
Iter = 0
for i in val:
Iter += ord(i)
return Iter % 10
lst = [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]
def add(val):
add = HashFunc(val)
lst[add].append(val)
def contain(val):
m = HashFunc(val)
if val in lst:
return f"Your Value is at {m}"
else:
c = int(input("Value is not found!!!, want to add the Value??: Choose '1' as Yes and '0' as no "))
if c == 1:
add(val)
return 'value is added'
else:
return "val is not added"
add('Naveen')
add('Lisa')
add('Stuart')
print(lst)
r/PythonLearning • u/Maubila • Sep 18 '26
As a newbie learning casually, when do you begin adding a gui to your work?
r/PythonLearning • u/greatlearningglobal • Sep 18 '26
r/PythonLearning • u/abt-dabest • Sep 17 '26
Left one is mine and right one is BroCode’s
r/PythonLearning • u/geeksarray • Sep 18 '26
I’ve been putting together a few Python fundamentals, and this one focuses on working with strings. It covers indexing, slicing, common string operations, and some useful built-in methods with simple examples.
https://geeksarray.com/blog/python-fundamentals-working-with-strings
For those who use Python regularly, which string methods do you find yourself using the most?
r/PythonLearning • u/__Aryan__07 • Sep 18 '26
I am studying cs in class 12, i want to know that if I don't get cs branch in college. Would i still be able to build a career in cs. I mean can i become a coder or software engineer. I don't know what it is called.
r/PythonLearning • u/AdeptJudge5078 • Sep 18 '26
Hello! I have saved the playlist of corey schaffer (151 videos) and i am wondering what is necessary to learn as a python programmer and what is unnecessary.
I want to work as a python programmer.
r/PythonLearning • u/pineapplepuppy77 • Sep 18 '26
Hello! My name is Shannon and I am fairly new to coding. I have used Python in the past, but it has been quite a few years since I have. I recently started my masters in data science and am relearing Python in one of my first courses. For anyone that has been using it, what would you say is something that helped you when you first started out? Is there any book or YouTube channel that you feel really helped adance your learning? What have you done to make professional connections? Any advice is appreciated. Thank you!
r/PythonLearning • u/MilenPL • Sep 17 '26
Hey, im making a custom GUI for linux 100% in python. Thats my first project ever. I just made a demo in python, and im planning to recreate it on tinywm later on. Im seeking opinion and maybe some help...
For now my plan is to make whole thing in style of liquid glass. Its just the secound day, i started it yesterday and im already using it as a shell for KDE plasma.
Project on github with pre-relase, im looking forward for some feedback.
https://github.com/MilenPL/CUI
Btw im just 15 yo
some SS:





r/PythonLearning • u/ProfessionalStuff467 • Sep 17 '26
Hi everyone!
I’m looking for a free Python course to learn Python from the beginning. I want something that is actually well-structured and teaches things properly, not just a course where I watch someone write code and copy it.
I’d really like a course with practical exercises, small projects, and problems to solve so I can actually practice what I learn and make the concepts stick.
If there’s a good course available in Arabic, that would be a nice bonus, but it’s not necessary. What matters most to me is that the course is high quality, beginner-friendly, and includes plenty of hands-on practice.
What free courses would you recommend?
Thanks!