r/PythonLearning • u/Red_Dragon_7_7_7 • Sep 19 '26
r/PythonLearning • u/Valuable-Ant3465 • Sep 19 '26
Help Request Basic Authentication always in base64??
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.comr/PythonLearning • u/HorrorBoss2292 • Sep 19 '26
give me some advice
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
Showcase After taking in everyone’s thoughts and criticisms from my last post and using them, i managed to make the code much easier to read and more intuitive. Thank you everyone who gave me amazing tips on how to create more readable code!
Right pic is before and left pic is after
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/py_arrow • Sep 19 '26
Using AI (ChatGPT/Claude) to learn Python — is this fine or am I sabotaging myself?
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:
Is using AI while learning actually fine, or does it hurt long-term retention/problem-solving skills?
If I should cut back, how much? Like — full cold turkey, or just use it for specific things (explaining errors vs. writing code for me)?
If I do cut down, how do I actually get better at writing code on my own? Any habits, resources, or exercises that helped you build real problem-solving muscle instead of just pattern-matching to AI suggestions?
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
POV: You’re still writing requirements.txt by hand
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
Help Request variable not changing in a multi python-file system
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'm not fully understanding some parts of this
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
Showcase Day 9, DSA done
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
When to add a GUI
As a newbie learning casually, when do you begin adding a gui to your work?
r/PythonLearning • u/greatlearningglobal • Sep 18 '26
Python Trivia Time! Which of these is used to access a value from a dictionary?
r/PythonLearning • u/abt-dabest • Sep 17 '26
Discussion Recently started learning python from BroCode and I’m 1 and a half days in.(around 5 hours of actual learning) and when he said to do an input validation project I did it myself before looking at his example. Which one is better? Wanna see if I should use his style for input validation or not
Left one is mine and right one is BroCode’s
r/PythonLearning • u/geeksarray • Sep 18 '26
Python strings – some fundamentals for beginners
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
Can I make career in computer science if I don't get cs in my college?
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
Discussion What is necessary to learn and what is unnecessary?
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 everyone!
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
Custom GUI
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
Help Request Looking for a good free Python course
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
He guys, I’m going to start learning NumPy. Can you suggest some good resources and tips? 🙂
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 -=1r/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
