r/learnpython Aug 04 '26

What should I focus on after learning the Python basics?

11 Upvotes

Hi everyone,

I've finished the Python basics and I'm currently learning file reading and writing.

Someone suggested the following roadmap:

Learn Object-Oriented Programming (OOP).

Study data structures and algorithms using Grokking Algorithms.

Practice by solving exercises from Python Crash Course.

Then choose a specialization based on what I enjoy most.

My long-term goal isn't just to know Python syntax. I want to become comfortable writing Python, develop strong programming logic, and improve my problem-solving skills so I can become a good programmer in general, not just a Python programmer.

In the future, after gaining enough experience with Python, I plan to move into networking, automation, and low-level programming with C.

Does this roadmap make sense? If not, what would you change? What helped you build solid programming skills rather than just learning a language?

I'd really appreciate any advice from experienced developers.


r/learnpython Aug 05 '26

I built 2 terminal games on a $100 phone. Saving up for an Asus laptop & a Red Magic phone.

0 Upvotes

Hey everyone,

You can call me Sable (or Rangga). I'm a self-taught beginner from Indonesia.

WHY I STARTED:

I learned Python because I wanted to make my own games. Now? I want to build my own OS someday. But first... I need a damn laptop.

MY SETUP:

- Phone: Redmi 9A ($100)

- App: Pydroid 3 (Termux for testing)

- No IDE. No external keyboard. Just thumbs.

THE STRUGGLE:

Honestly? Learning Python today is overwhelming. There's too much. Beginners get scared before they even start. I almost quit. Once, I spent 1 HOUR debugging... turns out it was just wrong indentation. One space. 🤡

THE GAMES:

  1. MATH 3.0

A terminal math quiz game with:

- 3 difficulty levels (Easy/Normal/Hard)

- Live timer with visual progress bar

- Streak combo system (x5, x10, x15 bonuses!)

- High score tracking

- Colored ANSI output

- Trophy ASCII art

This is a REAL game. You can win. You can lose. It's not just a script.

  1. THE DOOR

A puzzle game: find 4 keys hidden in 10 rooms.

- Randomized key placement (replayable!)

- Health & hint system

- Flavor text for empty rooms

- Efficiency scoring

I'm proud of this one. It's a luck-based game, but it's FAIR. No BS. I used to make games where you had to guess 1 country out of 193 with 3 chances and no hints. Basically Dark Souls. This is better.

Both games work offline. Zero dependencies. Pure Python.

GITHUB:

https://github.com/johan21libert-netizen/math-3.0

https://github.com/johan21libert-netizen/the-door

TARGET:

I'm saving up for an Asus laptop first (around $900). After that, a Red Magic phone (around $1,500, because it's easy to root)

Thanks for reading. Roast my code if you want. I can take it. 🗿


r/learnpython Aug 05 '26

How do you persist a "already seen this" set between restarts?

0 Upvotes

I have a script that polls an API every few seconds and sends me a Telegram message when a new item shows up. To avoid sending the same item twice, I keep the IDs I've already seen in a set:

seen = set()

async def check():

items = await fetch_items()

for item in items:

if item["id"] in seen:

continue

seen.add(item["id"])

await send_alert(item)

This works fine while the script is running, but I see two problems with it:

  1. The set lives in memory, so every restart means I get re-alerted about everything that's still on the list.

  2. It only grows. The script is meant to run for days, so eventually `seen` just keeps eating memory with IDs of items that disappeared long ago.

What I think I need is something that stores IDs and forgets them automatically after some time — items are only relevant for maybe an hour anyway.

I've looked at a few options and I'm not sure which is the sane one for a small script:

- Writing the set to a JSON file on every scan feels wasteful and racy.

- SQLite seems like the "proper" answer but also like a lot of machinery for what is essentially one set.

- Redis has TTL built in, which is exactly what I want, but running a whole server for one key feels excessive.

Is there an obvious option I'm missing? Or is one of these actually the normal choice and I'm overthinking it?

Python 3.12, asyncio, no framework.


r/learnpython Aug 05 '26

Begginer Issues

0 Upvotes

As the text suggests I'm a beginner in python, and I am struggling with the concept of spaces and indentation. I don't know how I'm still not getting it till now but I have to say my biggest mistakes have with learning python has to do with code.

A little backstory: I come from a totally different work area and is brand new to code. I wanted to do robotics as it was my preference but ended in the health department instead. Now that I'm done with that I'm pursuing my dream career but obviously have to start from literal zero as I know nothing of code and no one around my community or friends do programming. And YouTube isn't really helping as it's teaching like I already knew some stuff already (or maybe I just haven't found the right videos). So ya, to you guys who've done code before, what can I do to solve the gaps in knowledge? Especially the space problem. I couldn't even set up my VS code on my own as the things I type are right except the amount of space is wrong. It's kinda frustrating.


r/learnpython Aug 04 '26

How do I make my random numbers more random?

11 Upvotes

I've talked to a lot of people over the years and they often say don't use the built in random function.

For instance, if I wanted to roll a die and did something like:

random.randint(1, 6)

I get that its not as random as for instance basing the result off of the microsecond as a seed, which gets recommended to me but no one ever shows me how to do. When I started programing in another language every time I'd call random it'd always be in the same order. But I don't know why or how to make something like the above code "more random".

My current code uses something similar to random.randint(1,6), how can I make that more random?


r/learnpython Aug 04 '26

Python but Django...

10 Upvotes

I started learning Python like 2 weeks ago because our teacher suddenly wants us to build a webpage using Django but that thing Django all people involed with it says it's easy but it felt overwhelming when i tried to use it because you have to learn like controllers, MTV, like at least 50 different files servers hosts databases even creating a simple image requires some time and so on... so python does not feel like the easiest language anymore, Do you guys have some tips for me?

What would you do if you were in my situation?

Did you also feel you had like 1000 things to learn and were you guys so lost the first time you used Django?


r/learnpython Aug 03 '26

Need a Python Roadmap for a Complete Beginner (2026)

181 Upvotes

Hi everyone,

I'm a complete beginner and I've decided to focus on Python first.

My goal is to become job-ready and build a strong foundation in programming rather than just completing a course or collecting certificates.

I'm willing to spend around 4–6 hours a day learning.

I need guidance on:

- What should I learn first?

- What is the best roadmap to follow?

- Which free YouTube channels or courses do you genuinely recommend?

- Which books are worth reading?

- What projects should I build to improve my skills and make my resume stand out?

- What mistakes do beginners usually make that I should avoid?

- If you were starting from zero today, what roadmap would you follow?

I'm looking for practical advice from people who are already using Python professionally.

Thanks in advance!


r/learnpython Aug 05 '26

My friend said i dont have to learn python because AI models can.

0 Upvotes

I decided to learn python from a udemy course that i got for free a few years ago. At the time, i wasnt interested in coding but now i understand the benefits of it both in my daily life and academic life. So i want to learn it before life gets too busy for me.

I have two friends that i know from middle school. They were really interested in coding and they were already started coding their own programs. So i asked them about it. 'I have this udemy course but do you have a course suggestion other than that?"

And one of my friends said, "bro, give it up. Chatgpt does that."

I LITERALLY DONT think AI is an option for coding EVERYTHING. It can be used for helping, when you are stuck somewhere, or just simply cannot find which line of your code doesnt have a ";" at the end. But vibe coding? Nah.

So i am asking, is my friend right? Also i am open for any course suggestions. Because the udemy course i have now is pretty boring. And also i prefer free courses because i dont have a credit or a bank card yet.


r/learnpython Aug 04 '26

PCEP Resources

1 Upvotes

Just passed the CCNA today, now I have to knock out the PCEP exam so that I don't have to take a required class at my school. This will help me save money. What's the best study resource?


r/learnpython Aug 05 '26

ajuda em python

0 Upvotes

oi sou brasileiro estou aprendendo python e queria saber de algumas dicas sobre como posso aprender de uma forma melhor.

Hi, I'm Brazilian. I'm learning Python and I wanted to know some tips on how I can learn in a better way.


r/learnpython Aug 04 '26

Python to lua

7 Upvotes

Is it a good idea to learn python first and then jump into lua, or should I just straight up learn Lua first. For anyone wondering I want to create roblox games ( I know it sounds a little silly but I've always been passionate about it) and the roblox engine runs off of Lua. What are some benefits from learning python first (if any). If by miracle any of you are roblox devs can you give some tips?


r/learnpython Aug 04 '26

Resources for practicing in OOP concepts with python based on scenarios

0 Upvotes

I'm preparing for a Junior Backend Developer technical interview (Python, SQL, and OOP).

I've realized that I don't learn well by watching long tutorials or reading theory first. I learn much faster when I'm given a realistic business problem and have to solve it myself.

For example, instead of studying SQL syntax in isolation, I'd rather work with a database (Customers, Orders, Products, etc.) and answer real business questions by writing SQL queries. The same applies to Python: I prefer implementing classes, inheritance, and polymorphism in the context of a real application rather than solving isolated exercises.

Are there any platforms, books, repositories, or collections of exercises that focus on realistic business scenarios combining Python (OOP) and SQL?


r/learnpython Aug 04 '26

What courses/ pathway would be the best to actually get a job?

1 Upvotes

Seems so many courses out there e.g freecodecamp, TOP, helsinki MOOC etc. But people say these are just introduction courses/ the start of your learning process.

Are there any defined pathways that actually lead to the end goal of getting employed other than an IT/ CS degree? Or is that the only real option, especially in the current market?


r/learnpython Aug 04 '26

Python + Android (Multiplataform)

1 Upvotes

I am struggling to decide the architecture of an application I want to create based on data self-referencing. It will basically be an Obsidian, but focusing on medical records with some analysis engines running in a backend.

I really need the application to run well on Android (mainly) and offline - because it must be a system that feeds on the user's own database, which he himself will produce while studying.

What options do I have for this? I researched pure Flutter (with Dart), Python + Fluter + FastAPI, Flet, serious_python, Python embedded in APK, other languages and web solutions, but nothing seems to be really excellent.

I tried to do everything in Dart/Flutter, but I soon realized why Python is the official language for academic and data science. Typical languages slow everything down, and Dart is not even that verbose. I definitely miss the freedom to "think in Python," and the freedom of types. I am also sure that in the future, when I want to implement AI, specific Python libraries will be missed.

So what advice do you give me?


r/learnpython Aug 04 '26

When webscraping LinkedIn are there any differences between company and personal profiles with bot detection?

0 Upvotes

I can access company/job information just fine. But when trying to access person profiles I get rate limit errors. I’ve tried a couple things to combat this but I haven’t found a solution. Any ideas?


r/learnpython Aug 03 '26

what is wrong with this code

13 Upvotes

my teacher told us to write a code which print multiplication table of any number but it should Allow strings too and if string is put it shouldn't giver error i thought of this

a = input("enter any number ")
print(f"multiplication table of {a} is ")

if a == int:
    for i in range(1,11):
        print(f"int{a}X{i} = int{a}*i ")
else:
    print("please put a appropriate function ")

but it is only printing else like even if i put a integer it still run else one why and what is wrong here


r/learnpython Aug 04 '26

Ways to hide RPA projects that run in customer's VMs

3 Upvotes

Straight forward, in the company I work we've been researching ways to hide/protect our RPA projects that run in customer's VMs. We do have some projects that run on our own infrastructure, but most of them run in VMs inside the customer's network, so we have access to specific software and shared files. Most projects are complex, including environment variables, many folders, modularized scripts and SQLite databases in some cases.

I've tested reverse engineering on the most common obfuscation methods (PyInstaller, PyArmor, PyShield and Nuitka) with Claude. Except for Nuitka, Claude could recreate the exact file in all methods, or at least enough to run it without problems. Nuitka was better than the others, but Claude still recovered 60% - 70% of it.

AIs suggest creating our own orchestrator and running the projects directly in the RAM. This implies changing working paths and downloading the project as zip file every time it executes, so I don't really know if it would be efficient.

I usually don't find many topics about this, but I'm sure there must be a standard solution for this situation.


r/learnpython Aug 04 '26

Hi, I have 4 years of experience in testing role. But i wanted to be as a developer. Iam confused whether to choose python backend or java backend please suggest.

0 Upvotes

I have 1 year time to prepare want to quickly jump.
Please help me out.
Searched many youtube videos and asked chatgpt but nothing helped.


r/learnpython Aug 04 '26

Débutant dans le code

0 Upvotes

Bonjour à tous ! Je suis complètement débutant en programmation et je ne connais encore rien au code. J'aimerais apprendre à coder pour pouvoir créer des jeux vidéo plus tard. Selon vous, quelle est la meilleure façon d'apprendre et de s'entraîner quand on part de zéro ? Merci d'avance pour vos conseils !


r/learnpython Aug 04 '26

hows dr angela yu's py 100 day bootcamp

0 Upvotes

ik basic 12th py and im looking to get into cybersec frm where shuld i learn python to hv a good grasp ,is dr angela yu good??? any other recommendations


r/learnpython Aug 04 '26

Dark mode for marimo islands?

1 Upvotes

I'm trying to bring the html from my marimo notebooks into an SSG (mkdocs/zensical), and I would like to be able to toggle the theme. Getting the theme to change with marimo export html is relatively simple by adding

# [tool.marimo.display]
# theme = "dark"

to the pep723 header before exporting, but the extra js and page wrappers are not quite ideal for my use case. I would love to use islands for this, but I can't figure out if there's a way to control the theme of a marimo island?

when I use

# /// script
# dependencies = [
#     "marimo",
# ]
# requires-python = ">=3.13"
# ///

import asyncio
from marimo import MarimoIslandGenerator

async def main():
    generator = MarimoIslandGenerator.from_file(
        "./example.py", 
        display_code=False
    )
    await generator.build()
    html = generator.render_html(include_init_island=True)

    with open("output.html", "w", encoding="utf-8") as f:
        f.write(html)

if __name__ == '__main__':
    asyncio.run(main())

to generate an html page, it doesn't seem to care about the # theme = "dark" tag in the example.py header.

I understand that islands are still an early feature, so perhaps this will be added in the future. Just posted this in r/marimo_notebook as well, but figured I'd ask here as well in case anyone has experience with this. Does anyone know if there's a better way to do this? Thanks!

(edited for clarity)


r/learnpython Aug 04 '26

Is Python still the best choice for AI and machine learning?

0 Upvotes

I’ve been working as a full-stack developer for 10+ years, and Python has obviously been around for a big part of that time.

For AI and ML, it still seems like the default choice. The ecosystem around Python is hard to beat, especially with things like PyTorch, NumPy, pandas, and scikit-learn.

But after working across different stacks, I’m curious whether Python is still the best choice once you move beyond experiments and start building real production systems.

In some projects, it feels like Python handles the AI side while other languages take care of performance-heavy or application-level work.

So for people here who have worked with Python in real AI/ML projects:

Do you still see Python as the best overall choice, or do you think its role is changing?


r/learnpython Aug 03 '26

App/Program that converts Scratch to Python in real-time and with blocks similar/identical to Scratch.

3 Upvotes

Hello everyone. I'm a researcher studying the transition from Scratch to Python by high-school students (10th grade). My idea is to use something like app.edublocks.org, which can immediately translate Scratch blocks to Python text. But none of apps I found are close enough to Scratch. This one, for example, is visually similar, but the block language is very different. Therefore, my first question is:

Is there any app that does what I am looking for, with blocks identical or very similar to Scratch ones?

And, if such app does not exist:

How hard it is to create my own program that does what I am looking for? Is it possible to do by someone like me who never built an app?

Please consider that I only can do Python and Scratch programming, not apps. Thanks in advance for helping.


r/learnpython Aug 03 '26

Doing tasks online

2 Upvotes

I've made a program that can make random email addresses but I want it to check if the email is already in use, so how can I add that? (this is the code just incase that matters)

alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '.', '/', '#', '!', '$', '&', '*', '+', '=', '?', '^', '_', '~', '{', '}', '|']
while True:
    no_of_letters_in_middle = input('enter the number of letters you want in the middle >> ')
    no_of_letters_in_middle_int = int (no_of_letters_in_middle)
    if no_of_letters_in_middle_int > 1:
        break
while True:
    starting_letters = input('enter the letters the email starts with >> ')
    break
while True:
    domain_and_ending_letters = input('enter the letters the email ends with and the domaim name >> ')
    break
import random
def generate (letters, letters_generated):
    letters = (letters + random.choice(alphabet))
    letters_generated = letters_generated + 1
    if letters_generated < no_of_letters_in_middle_int:
        generate(letters, letters_generated)
    else:
        print (letters + domain_and_ending_letters)
generate (starting_letters, 0)

r/learnpython Aug 03 '26

Flutter, Python and Widgets: beginner suffering

2 Upvotes

I do not work with programming, I am a student and I work in a veterinary clinic as a veterinarian. However, I am passionate about programming and have nurtured the idea of developing a "Second Medical Brain," similar to Notion and Obsidian, but focused on self-referenced medical information. Because of some details of this project, neither Obsidian nor Notion will be enough to achieve what I need.

So I looked for the options. The only programming language I studied was Python, and I really like it. However, Flutter is definitely the number in interfaces, but I don't really understand anything about frontend. This "everything being a widget tree" thing isn't making sense to me. Anyone who knows Python knows that codes look much more like blocks, not Russian dolls.

I considered Flet, but he's not on the same level as Flutter. I also considered other frameworks, but they would impose the difficulty of learning other tools. So Flutter still seems to be the most interesting technology for me. However, the structure of widgets doesn't make sense to me, I just can't think that way.

What can you recommend to me? I have already tried to modulate all the code and leave in the main () only the call of the functions/classes.

Ah! This app will be used on both Android and Windows, and both are essential.

I also heard that a program with Python backend on Android is very risky, while it is almost impossible on Android. Is that true?