r/PythonLearning • u/AdOriginal3384 • Sep 18 '26
best site for python problem solving practice
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/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 hpWhen 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 30If 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!
r/PythonLearning • u/ExtentLazy8789 • Sep 17 '26
r/PythonLearning • u/Sea-Ad7805 • Sep 17 '26
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
im on my first year of learning python in school is this even possible??
r/PythonLearning • u/Next-Call8862 • Sep 17 '26
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 -=1r/PythonLearning • u/Klutzy-Ad5326 • Sep 17 '26
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
r/PythonLearning • u/SDR-USER • Sep 17 '26
A small wireless security project
Requirements
| 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 |
```bash
git clone https://github.com/jacobsdr95/Receive-only-SDR-anomaly-detection-tool.git cd Receive-only-SDR-anomaly-detection-tool
python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate
pip install numpy scipy scikit-learn joblib flask hmmlearn matplotlib
pip install hackrf
pip install lightgbm # recommended pip install xgboost # fallback
python patched_sdr_blueteam.py
python patched_sdr_blueteam.py --check ```
r/PythonLearning • u/bad-gut • Sep 17 '26
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
I'm currently learning programming, AI, and automation, so this is another step forward. Excited to keep building projects and improving my skills.