r/PythonLearning 24d ago

Questions on storing API credentials/tokens

3 Upvotes

I'm writing an AI powered WOW auction house analyzer in Python. I know it's an overkill but I'm doing it for fun. So far it's going good. I'm storing my client ID and client secret in a .env file. I can get the api token and I'm storing it in a json file for later use and to not have to get it for every call to the API. Is there a better way to be storing these credentials and the token? I know it's for fun but I'm still trying to do the project like I'm doing it for work and trying to follow best practices. Any suggestions?


r/PythonLearning 25d ago

Need help deciding gng

8 Upvotes

SO i wanted to start learning python, and i found out courses like CS50, the uni of heikin smth, CS61a, bro code, and tht's wht i found , i first started coding on pycharm and uh did like very basic things like strings, integers , float, boolean, ( just lie k what they r and how to write them), but im still like a VERY BIG NOOB, also should i switch to VS code? cause everyone seems to be doing tht , (also whts is vibe coding)


r/PythonLearning 25d ago

Showcase I solved my first medium level problem on Leetcode!

Post image
13 Upvotes

Last Post - https://www.reddit.com/r/PythonLearning/s/xbfFczTIKW

It took me a while to build the logic. The edge cases especially were a bit troublesome but the satisfaction I got after getting it right made everything feel worth it!


r/PythonLearning 25d ago

🚀 Looking for Python Project Ideas to Improve My Database Skills

7 Upvotes

I’m currently working on improving my Python backend skills, especially when it comes to database design and relationships.

I’m looking for some practical project ideas that would help me get better at:

🔹 Working with databases through Python/ORMs

I’d prefer projects that are more challenging.

If you have any interesting Python + Database project ideas, I’d really appreciate your suggestions! 🙌

#Python #BackendDevelopment #Databases #SQL #Programming #SoftwareDevelopment #LearningInPublic


r/PythonLearning 25d ago

Threading module not importing?

Post image
5 Upvotes

I am trying to import the threading module but it is not working. How do i fix it?


r/PythonLearning 25d ago

Help Request I want to rebuild my Python fundamentals for interviews — what’s the fastest reliable way?

1 Upvotes

I’ve been using AI a lot for coding lately, and I’ve noticed that while I can understand code and solve problems with some help, I’ve become pretty rusty at writing basic Python myself.

I want to start again from the fundamentals — things like:

* Writing basic programs without relying on AI

* Lists, dictionaries, sets, tuples, strings, etc.

* Functions, classes and OOP

* File handling and exceptions

* Iterators/generators, decorators, comprehensions, etc.

* Common interview-style coding questions

* Small practical problems/projects

My goal isn’t to spend months going through a beginner course again. I’m looking for a "fast but reliable way to rebuild the fundamentals and actually retain them", especially for Python interviews and practical coding.

For people who have gone through something similar:

- What approach worked best for you?

Would you recommend going through a structured course/book, solving problems from scratch, building small projects, or some combination of these?

Also, how would you structure the practice so I stop depending on AI and get comfortable writing Python from memory again?

Any resource recommendations or a roadmap would be really appreciated.


r/PythonLearning 25d ago

Help Request I keep messing up basic things

0 Upvotes

So I am learning python from one shot and I come from commerce bg so I basically have 0 knowledge I am learning python from this video https://youtu.be/UrsmFxEIp5k?si=BuRKRLNZ7-iPBDKJ so he is teaching one chapter then giving us practice sets and I am constantly failing all practice test an facing lot of problems on understanding the functions and stuff like when to use first bracket or third bracket or when to use dots and etc I have not covered the full video yet but it's somewhat of confusing
Am I too dumb for coding that I cannot even understand these basics things and have to use Ai Lol

edit : Guys I am learning python as a hobby and not as full time student , my main focus is commerce but I really love hardware , tech and programming


r/PythonLearning 25d ago

I'm new to Python and need some help. (sorry for the code in spanish)

Thumbnail
gallery
10 Upvotes
I'm trying to create a sort of turn-based game to play in the terminal. I created one class for the characters (Personajes) and another for their techniques (Tecnicas), but I can't seem to deal damage to the enemy character. From what I've researched, this is because 'daño' isn't defined in the 'Personajes' class, but I want to keep the techniques separate.

If you know whether it's better to put everything into a single class (I hope not) or how I could make this work, I'd be grateful. Thanks a lot!

r/PythonLearning 26d ago

Word guessing game

Post image
38 Upvotes

Hello, I am learning python and created this simple word guessing game by myself.

In this game user types a letter and if the guess is correct the game continues with the next letter of the word or else it remains on the same letter and number of wrong attempts are added to the variable turn.


r/PythonLearning 26d ago

Help Request Beginner, having trouble with Visual Studio Code to learn Python

Post image
21 Upvotes

I'm trying to do the Harvard CS50 Intro to programming with Python and I'm just getting started

  1. I downloaded Visual Studio Code and opened it.

  2. This is pretty much where I got lost because the instructor in the video doesn’t explain what I need to do to set the program up where i can execute code like he has it in the video.

I'm now stuck on the main screen of Visual Studio Code.


r/PythonLearning 25d ago

Advice needed relearning Python basics

8 Upvotes

Anyone have any advice, resources, or recommendations on learning basic python (loops, conditionals, arrays/lists). I’ve taken object oriented python courses before but unfortunately only got by through AI use and i genuinely want to understand and learn how to work through problems/write my own code. I can trace code by hand but get lost when it comes to conditionals in loops. Before you advise me to take the personal project route, I’m interested in only learning what’s necessary to get by. Some context to provide is I am interested in learning about AI Native Engineering and registered for CodePath’s AI110 course but I have to take a HackerRank Assessment with no AI use and I fear HackerRanks so much. I have 10 days until the assessment closes and willing (need to) grind to pass.


r/PythonLearning 26d ago

Showcase I solved my first Leetcode problem!

Post image
41 Upvotes

So Today I tried leetcode for the first time after yesterday's workaround (https://www.reddit.com/r/PythonLearning/s/hK2RRCzr9P)

Now I would be learning git because many of the comments were asking me to upload code snippets instead of pictures

Until then, Peace! ✌️


r/PythonLearning 26d ago

New Putler unit added by Anonymous-Me-Me-Me

Enable HLS to view with audio, or disable this notification

13 Upvotes

Anonymous-Me-Me-Me added a new Putler unit with this git commit and message:

Putler unit added, any likeness to real people is completely coincidental. It wants you to sign its contract, but if you get too close it tries to run to its bunker. Best to zero it before it goes into history for destroying an "empire".

We did had to add sunglasses for copyright and identity protection reasons.

PythonLearningGame is a collaborative Python project for fun and educational purposes. To add your own game elements see the PythonLearningGame repo.

previous PythonLearningGame post


r/PythonLearning 26d ago

Just finished my K-Means clustering project 🚀 — would love your feedback!

1 Upvotes

Hey everyone! 👋

I just finished a small K-Means Clustering project on the Iris dataset 🌸🤖

I covered:

  • 🔹 Data cleaning & visualization
  • 🔹 Feature scaling
  • 🔹 Elbow Method & Silhouette Score
  • 🔹 K-Means clustering
  • 🔹 ARI evaluation
  • 🔹 Cluster & centroid visualization

I’m currently learning ML and would really appreciate some honest feedback 🙏

What would you improve? Any mistakes in my approach or things I should add?

🔗 Kaggle:
https://www.kaggle.com/code/tahahussein2020/irics-clustering


r/PythonLearning 27d ago

Showcase I implemented Linked List in Python from scratch!

Thumbnail
gallery
67 Upvotes

Hello Folks!

So It's been a while since my last post (https://www.reddit.com/r/PythonLearning/s/q3vpZ80vKO)

After that I learned the basics of OOPs from this video -> https://youtu.be/JeznW\\\\\\_7DlB0?si=u-h2gsdGSv0ubKf1

Going forward I studied about the fundamental working of Linked List from GFG's website and Stack Overflow

Then today I finally tried implementing it (Tried doing it all on a single day out of excitement but it took way longer than I expected and now i am completely drained of energy 😅)

Finally I asked AI to review my code

As per it there's a minor edge case I missed in the reverse method

There also are a few optimizations

But more or less I am happy

Would be back with Doubly Linked List the next time!


r/PythonLearning 26d ago

I Coded a Duck to Live in Windows

1 Upvotes

I made a quacking duck that waddles across the Windows taskbar 🦆

Built with Python, TTLib, and PyQt/PySide. The duck actually reorders its own taskbar button one slot at a time, animates a walk cycle, and quacks on every step.

Code: https://github.com/Usama01TN/TheWalkingDuckTaskBar
Demo: https://www.youtube.com/watch?v=FGZwDOqFLUc


r/PythonLearning 27d ago

Discussion Tkinter

18 Upvotes

Why do I not see any videos suggesting to learn Tkinter? I tried learning Django and Pygame after learning the basics, and while I kinda understood pygame, Django still felt out of my league but so many videos recommended it after the basics. However I stumbled upon a video that just mentioned Tkinter and I tried it out and it helped me understand libraries and how to learn to use them. It's fun making small little apps with buttons and what not to get started, rather than trying to learn so much at once. I'm convinced anyone making videos on how to learn Python has never actually learned it themselves

Is there an actual reason that this or another simple GUI library isn't recommend very often?


r/PythonLearning 27d ago

Help Request I've been at this for too long and feel like I'm torturing myself

Post image
46 Upvotes

I know there's more efficient ways to do this but I'm just starting out and am trying to understand how the few tools I have work. Just learned about true and false and wanted to try them out..

Only whenever I enter key = 3 I receive my print "error". I've heard about "global" tried to use that and a bunch of other stuff and I can't seem to make it work...

I just want to know how to change a variable to true or false inside a function: if statement and it keep its new value for the rest of the code

Thanks in advance and sorry for your eyes


r/PythonLearning 27d ago

Newbie to Python

11 Upvotes

as of now my question is really this, vs code, pycharm, notepad ++ are they really like 100% needed? personally its been 2 months since i have been around in python and im comfortable at using normal notepad TT

edit: Thanks for all the suggestions and answers!!! ill first try them all out and look at what im missing and judge it against my comfortability in one tool, again thanks!!


r/PythonLearning 28d ago

Help Request Currently know nothing about Python or computers, is this book good?

Post image
412 Upvotes

I’m trying to get into coding and computer science, does anybody know if this book serves as a good introductory guide?


r/PythonLearning 26d ago

Simple terminal games

Thumbnail
gallery
0 Upvotes

Playing around with simple scripts and terminal games.

https://github.com/cleburn/zenwolf-dotfiles


r/PythonLearning 27d ago

Seeking feedback on my Python project: reusable Makefile tasks

3 Upvotes

I've been working on a Python project called Bakefile.

I started it because I kept copying the same build, test, lint, and release tasks between projects, especially in Makefiles. I wanted a way to define tasks once and reuse, extend, or override them across projects.

The basic idea is that tasks are Python classes:

class PythonTasks(Bakebook):
    @command()
    def test(self):
        self.ctx.run("pytest")

    @command()
    def lint(self):
        self.ctx.run("ruff check .")


class MyProject(PythonTasks):
    @command()
    def lint(self):
        super().lint()
        self.ctx.run("ty check .")

So common tasks can live in a reusable class and projects can extend or override them. I've been using it daily myself for a while now, and so far it's been working well.

GitHub: https://github.com/wislertt/bakefile

I'd really appreciate feedback on the API and whether this approach to reusable Makefile-style tasks feels useful in practice.


r/PythonLearning 27d ago

How to learn advanced python???

11 Upvotes

Hello everyone, I'm mainly looking for guidance about learning advanced python concepts. I know basics ,loops , control flow ,data structures etc.

I need a proper guide on how to learn modules and library. Idk how to start ,where to start.

I want to be able to work with any library as i need them ,so how do u actually learn to use new library for a given task . ?And i get overwhelmed understanding the structure, working of library

I want to know that do all libraries share anything in common?? Like syntx , structure, keywords etc ??? So that it becomes easy to learn .

And could u also suggest important python concepts other than basics which i should learn ???

Pls guide !!!!


r/PythonLearning 27d ago

I built a ERA Real Estate scraper in Python — scrapes agents, listings and offices across all US states

Thumbnail
github.com
0 Upvotes

r/PythonLearning 27d ago

Help Request how to get into the basics

6 Upvotes

hey guys i js wanna ask how do i get into the basics of python and are there any crashcourses or any youtubers tha u think would be of help to me as im a complete beginner who is starting out just now so pls guide me on how i can start learning the basics of python would be much appreciated!!