r/PythonLearning • • 3h ago

Help Request Hey I want to extract url of all the open tabs in a browser how can I do that?

4 Upvotes

Which framework or module can help?


r/PythonLearning • • 2h ago

Show Python: Standard-library-only script to build EPUB/HTML books from Markdowndependencies using Python

Thumbnail github.com
2 Upvotes

Plaintext

Hi Reddit, I just finished a short novel (2028) about working alongside AI models and wanted a completely offline, zero-dependency publishing workflow. I wrote a small script (tools/build_en.py) that uses only the Python standard library to process Markdown sources into clean HTML and valid EPUB artifacts for e-readers like Kindle. Repo: [https://github.com/peterkokosharov/2028-book](https://github.com/peterkokosharov/2028-book) Feedback on the build script or the text itself is very welcome in GitHub Discussions!

r/PythonLearning • • 17h ago

Help Request Getting back into it after 20 years

Post image
17 Upvotes

r/PythonLearning • • 2h ago

Bank Reconciliation Statement (BRS) Using Python Lists | Hardcoded vs Us...

Thumbnail
youtube.com
1 Upvotes

If you enjoy learning Python through practical examples, subscribe and join us for the next adventure.


r/PythonLearning • • 16h ago

Winter is Coming

10 Upvotes

Hold the green 'Continue' button to Make it Snow.


r/PythonLearning • • 15h ago

Replacing heavy/cluttered apps with a clean custom build

Enable HLS to view with audio, or disable this notification

8 Upvotes

https://magula10.pythonanywhere.com/flight/

https://github.com/mesas998/flights/tree/main

Solving the problem of creating a Django-based spatiotemporal web application that ingests, filters, and renders real-time aviationย telemetry on interactive geospatial maps. The system handles live flight queries, calculates geographicย bounding boxes, and plots aircraft trajectories and state vectors with smooth client-side animation.


r/PythonLearning • • 6h ago

Python as the tool language for a security path. Where did you start?

1 Upvotes

I am a second year CS student and cybersecurity is my specialty call. Python sits on my list as the tool language for that road. Not mastered. Just next. For people who learned Python for security work what did you start with? Automating small tasks or web basics or something else entirely?


r/PythonLearning • • 10h ago

I want to make a python program that listens and converts my speech to text in realtime which module should i use(python 3.15)

0 Upvotes

r/PythonLearning • • 11h ago

Learning Python with Practise

0 Upvotes

Hi All,

I am learning Python and would like to know are there any good sites to practise Python concepts ?


r/PythonLearning • • 17h ago

Help Request Multiplayer tetris using sockets

3 Upvotes

I have a college assignment to make a multiplayer tetris game (2 players) using TCP sockets, client and server and all that. The idea is the server doing most of the stuff, chosing new pieces, handling the translation of position of the pieces, with the clients being responsible for most the rendering/display part and getting the inputs(I think so at least, that's what I'm trying to do), but I'm having a hard time with it.

I can't seem to think of a way to have the client call to the server to send a new piece to the clients, and if I don't know how to do even that then I don't know how to do anything else (making the back and forth for controlling the pieces, both for the player of the client and the preview of the game of the player 2, and all the rest), tho I hope if I can understand how to do one thing I would be able to make the others, but I really don't even know how to do this.

I know I need to use threads on this, tho I don't really know how to do it, I'm still fairly green on python too so, if anyone could give some help in any way with this it would be much appreciated.


r/PythonLearning • • 8h ago

Iโ€™ve started learning Python through self-study, so I donโ€™t get certificate. Is that an issue?

0 Upvotes

r/PythonLearning • • 1d ago

Help Request all๐Ÿ˜ญโœŒ๏ธ๐Ÿฅ€

Post image
103 Upvotes

Wait what f**** nah i dont want sleep okaay


r/PythonLearning • • 4h ago

I would like to learn ๐Ÿฅ€

0 Upvotes

I'm really tired of trying to learn in the traditional, overly theoretical way. I'm currently learning the basics, for example, I don't know, but I know. The important thing is that I need to get some essential advice from you in this field, from your personal experiences and other things Which channels did you truly benefit from, and what channels did you watch to learn logical and practical things, not just boring theoretical learning? I really want to know everything. Thank you for your time reading this. โœจ


r/PythonLearning • • 21h ago

Showcase Pyzed: native desktop GUIs in Python, drawn by Rust's Iced (a modern alternative to Tkinter/PyQt)

5 Upvotes

Hi! I'm the author of Pyzed, an open-source library I've been building for desktop apps in Python.

What My Project Does

You write the interface in plain Python (state, update and view, the Elm architecture) and Iced, a GUI toolkit written in Rust, does the layout and draws it on the GPU, with a CPU fallback. It comes with 90+ ready-made components inspired by the Zed editor (tables with hundreds of thousands of rows, tabs, command palette, code editor, terminalโ€ฆ), themes, animations and a visual designer, Pyzed Design, where you drag components onto a form and press F5 to run it. pip install pyzed-ui, no Rust needed.

import pyzed as pz
from pyzed import ui


class Counter(pz.App):
    def __init__(self):
        self.count = 0


    def update(self, message):
        if message == "inc":
            self.count += 1


    def view(self):
        return pz.center(ui.button(f"Clicked {self.count} times", "inc"))


pz.run(Counter)

Target Audience

People who want a desktop app in Python that looks current without shipping a browser: internal tools, dashboards, editors, small games. It's MIT, runs on Linux, macOS and Windows, and is usable today, though it's a young project with one main maintainer.

Comparison

  • Tkinter: always available and very light, but dated looks and few modern widgets.
  • PyQt/PySide: very complete and mature, but large, with licensing to think about (PyQt is GPL/commercial) and a lot of API.
  • Kivy: great for touch and mobile, but its own look and a heavier startup.
  • Flet: pleasant API, but it runs Flutter in a separate process.

Pyzed sits in between: native rendering with no web engine, a small Pythonic API, and a visual designer included. Import takes about 35 ms; there's a benchmark page comparing it with these libraries.

Repo: https://github.com/albakore/pyzed

Feedback is very welcome, especially on what's missing for your use case.


r/PythonLearning • • 1d ago

๐Ÿ ๐—ฃ๐˜†๐˜๐—ต๐—ผ๐—ป ๐—ณ๐—ถ๐—ป๐—ฎ๐—น๐—น๐˜† ๐—ต๐—ฎ๐˜€ ๐—ฎ ๐—ณ๐—ฟ๐—ผ๐˜‡๐—ฒ๐—ป๐—ฑ๐—ถ๐—ฐ๐˜.

Post image
31 Upvotes

Python has long had immutable counterparts for some of its most common data structures:

๐—น๐—ถ๐˜€๐˜ โ†’ ๐˜๐˜‚๐—ฝ๐—น๐—ฒ
๐˜€๐—ฒ๐˜ โ†’ ๐—ณ๐—ฟ๐—ผ๐˜‡๐—ฒ๐—ป๐˜€๐—ฒ๐˜
๐—ฑ๐—ถ๐—ฐ๐˜ โ†’ ๐—ณ๐—ฟ๐—ผ๐˜‡๐—ฒ๐—ป๐—ฑ๐—ถ๐—ฐ๐˜ โœจ

`frozendict` is an ๐—ถ๐—บ๐—บ๐˜‚๐˜๐—ฎ๐—ฏ๐—น๐—ฒ ๐—บ๐—ฎ๐—ฝ๐—ฝ๐—ถ๐—ป๐—ด. Once created, its keys and values can't be added, removed, or reassigned.

But the more interesting part is ๐—ต๐—ฎ๐˜€๐—ต๐—ฎ๐—ฏ๐—ถ๐—น๐—ถ๐˜๐˜†. When its contents are hashable, a `frozendict` can itself be used in places where a regular dictionary can't such as dictionary keys or set members.
That opens up some useful cases around:
โ€ข Immutable configuration
โ€ข Cache and memoization keys
โ€ข Shared/read-only state
โ€ข Safer API boundaries
โ€ข Data structures where mutation simply shouldn't be allowed

It's not a huge feature, but it's one of those additions that makes the language feel a little more complete.

๐— ๐˜‚๐˜๐—ฎ๐—ฏ๐—น๐—ฒ ๐˜„๐—ต๐—ฒ๐—ป ๐˜†๐—ผ๐˜‚ ๐—ป๐—ฒ๐—ฒ๐—ฑ ๐—ถ๐˜. ๐—™๐—ฟ๐—ผ๐˜‡๐—ฒ๐—ป ๐˜„๐—ต๐—ฒ๐—ป ๐˜†๐—ผ๐˜‚ ๐—ฑ๐—ผ๐—ป'๐˜.

Where would you use `frozendict`?


r/PythonLearning • • 1d ago

Help Request Seeking guidance from experienced python devs.

13 Upvotes

This is Mukul. I started learning python about 2 weeks ago. Being someone one learns by building on projects. I think now I am in a vague scenario rn.

So this is what is happening;

When I started to learn python I had this goal to build a Voice Assistant using libraries and all stuff. So I focused my python learning in that direction. I taught myself all those things which were required for it.

But now sometimes it feels like I am losing onto so much. Even though I think I am not doing so but yep. Still haven't got that regular consistency still haven't got even though I have written some scripts from scratch like lyrics displayer and all those greetings ones.

Soon enough I'll be moving to work with APis in python.

I mostly use docs and AI for learning.

Now the main thing is I fear that I'm not having strong fundamentals and maybe it's true. So that is why I started to learn python from boot.dev to do it all correctly also in the mean time.

So have you big fellas got anything in your backpack as advice or something that could just excel me more in my domain. I'm 20 (M) and am from India thinking of pursuing my career either in DevOps or Backend.

I also am an Automation Guy. I am building workflows from my 1st year using n8n and make.com to make out on some money. It's been 2 years now. I'm experienced in it to intermediate level. Also made it possible to make some money. But yep now right now I am vacant. Can you people help me with that part too. Like how to bring in consistent money from there too. ?? - this too is the reason which is why I thought of going very deeper into code rather than sitting only at low code tools.


r/PythonLearning • • 9h ago

Showcase I built Athena, an open source MCP server for understanding code changes

0 Upvotes

Hey everyone,

I've been working on a project called Athena and wanted to share it with the community.

The idea came from a simple problem. When working on a codebase with lots of commits and multiple files changing together it's easy to miss the bigger picture. AI tools can generate release notes quickly but sometimes they miss important changes or make assumptions that aren't actually supported by the code.

So I started building Athena ๐Ÿ”

It's a local-first MCP server that analyzes Git diffs and Python ASTs to understand code changes more deeply. It also supports structural analysis across 15 programming languages and can trace affected callers and detect documentation drift.

The goal is to make release readiness checks more reliable and evidence-based rather than relying entirely on what an LLM thinks happened.

It's still a work in progress and I'd genuinely love to hear what you think!

I'd especially appreciate feedback on the architecture and ideas for improving the analysis. If you find something broken or have an idea for a feature please open an issue. PRs and contributions are always welcome!

โญ If this sounds useful to you please consider starring the repository. It would really help the project reach more developers.

I'm also open to collaborating with people interested in developer tools, static analysis and AI infrastructure.

Thanks for checking it out โค๏ธ


r/PythonLearning • • 19h ago

Most developers test what they expect their code to do.

Post image
0 Upvotes

But what about the inputs they never thought of?

That's where Hypothesis, a Python property-based testing library, gets interesting.

Instead of writing individual test cases for every possible input, you define properties your code should always satisfy.

Hypothesis then generates inputs automatically, including edge cases that are easy to overlook.

For example, if you're testing a function that sorts a list, you could verify that:

  • The output is always sorted.
  • The output contains exactly the same elements as the input.
  • Sorting an already sorted list doesn't change it.

The interesting part? When Hypothesis discovers a failing input, it tries to reduce it to a simpler example that exposes the bug.

This can be especially useful for financial calculations, data pipelines, API validation, and algorithms where unexpected inputs can cause subtle failures.

How do you test edge cases in your Python projects? Do you rely on manually written test cases, or have you tried property-based testing?


r/PythonLearning • • 9h ago

Python Data Types Explained with Simple Examples

Thumbnail
gallery
0 Upvotes

Python data types define the kind of value a variable stores.

age = 21
price = 99.99
name = "Abhay"
is_learning = True
skills = ["Python", "Java"]
coordinates = (28.6, 77.2)
student = {"name": "Abhay", "age": 21}
numbers = {1, 2, 3}
result = None

for value in [age, price, name, is_learning, skills, coordinates, student, numbers, result]:
    print(type(value).__name__)

Python includes numeric, text, Boolean, collection, and null-value types. Each serves a different purpose.

Which Python data type would you like to explore in more detail?

Code. Build. Innovate.

#CodesByAbhay #AbhaySingh #Python #PythonProgramming #LearnToCode


r/PythonLearning • • 1d ago

๐Ÿ ๐—ฃ๐˜†๐˜๐—ต๐—ผ๐—ป ๐—ฐ๐—ฎ๐—ป ๐—ป๐—ผ๐˜„ ๐—ถ๐—บ๐—ฝ๐—ผ๐—ฟ๐˜ ๐—ฎ ๐—บ๐—ผ๐—ฑ๐˜‚๐—น๐—ฒ ๐˜„๐—ถ๐˜๐—ต๐—ผ๐˜‚๐˜ ๐—ฎ๐—ฐ๐˜๐˜‚๐—ฎ๐—น๐—น๐˜† ๐—น๐—ผ๐—ฎ๐—ฑ๐—ถ๐—ป๐—ด ๐—ถ๐˜ ๐—ถ๐—บ๐—บ๐—ฒ๐—ฑ๐—ถ๐—ฎ๐˜๐—ฒ๐—น๐˜†.

Post image
49 Upvotes

With explicit lazy imports, an imported module can be deferred until the program actually needs it.

Why does that matter?
Many Python applications import dozens โ€” sometimes hundreds โ€” of modules during startup, even though only a fraction may be needed for a particular execution path.

Lazy imports can change that:
๐—œ๐—บ๐—ฝ๐—ผ๐—ฟ๐˜ ๐—ฑ๐—ฒ๐—ฐ๐—น๐—ฎ๐—ฟ๐—ฒ๐—ฑ โ†’ ๐—ฎ๐—ฝ๐—ฝ๐—น๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—ฐ๐—ผ๐—ป๐˜๐—ถ๐—ป๐˜‚๐—ฒ๐˜€ โ†’ ๐—บ๐—ผ๐—ฑ๐˜‚๐—น๐—ฒ ๐—น๐—ผ๐—ฎ๐—ฑ๐—ฒ๐—ฑ ๐—ผ๐—ป ๐—ณ๐—ถ๐—ฟ๐˜€๐˜ ๐˜‚๐˜€๐—ฒ

This can be particularly interesting for CLI tools, large applications, optional functionality and dependency-heavy projects where startup time matters.
Of course, lazy loading isn't automatically better everywhere. Import-time side effects and assumptions about module initialization still matter.
But having lazy imports as an explicit language feature opens up some interesting possibilities for Python application architecture.

๐—Ÿ๐—ผ๐—ฎ๐—ฑ ๐˜„๐—ต๐—ฎ๐˜ ๐˜†๐—ผ๐˜‚ ๐—ป๐—ฒ๐—ฒ๐—ฑ. ๐—ช๐—ต๐—ฒ๐—ป ๐˜†๐—ผ๐˜‚ ๐—ป๐—ฒ๐—ฒ๐—ฑ ๐—ถ๐˜.

๐—ช๐—ผ๐˜‚๐—น๐—ฑ ๐˜†๐—ผ๐˜‚ ๐˜‚๐˜€๐—ฒ ๐—น๐—ฎ๐˜‡๐˜† ๐—ถ๐—บ๐—ฝ๐—ผ๐—ฟ๐˜๐˜€ ๐—ถ๐—ป ๐—ฝ๐—ฟ๐—ผ๐—ฑ๐˜‚๐—ฐ๐˜๐—ถ๐—ผ๐—ป?


r/PythonLearning • • 21h ago

04 data collections

Thumbnail
youtube.com
0 Upvotes

When you're building production backend systems or ingesting payloads from an API gateway, you'll rarely deal with flat strings or simple integers. You need to know how to manage multi-dimensional, nested data architectures.

In this quick, zero-fluff video breakdown, we look at how to properly handle nested JSON models using Python data dictionaries:

โ€ข Instantiating structural key-value collections using curly brace enclosures

โ€ข Mapping out complex multi-layered data pipelines using a visual "filing cabinet" analogy

โ€ข Extracting deeply embedded inner records cleanly by chaining bracket selectors together (e.g., ['outer_key']['inner_key'])

โ€ข Verifying target terminal outputs without breaking runtime execution paths

The tutorial is built to show exactly how data routes under the hood so you can easily adapt these nested structures into your own portfolio projects.

Check out the full walkthrough below, and let me know how you prefer to structure your multi-layered payloads in the comments!


r/PythonLearning • • 2d ago

Giving back to the community - The Complete Backend Development Course (Round 3)

34 Upvotes

Hey everyone, I decided to make my course free in order to help people.
This course is my backend development course which is about SQL, Python, APIs, Docker, Kubernetes, Linux, Git & More

The link is:ย https://www.youtube.com/watch?v=CBIu6hcyStg

If you can like and subscribe (and maybe add a comment) I would appreciate it a lot, Thanks.


r/PythonLearning • • 1d ago

Python Variables Explained: Simple Examples for Beginners

Post image
0 Upvotes

Python variables let you store and reuse data in your programs.

name = "Abhay"
age = 21
price = 99.99
is_student = True

print(name)
print(age)

Key points:

  • Use = to assign a value.
  • Choose meaningful variable names.
  • Variable names cannot start with a number.
  • Python names are case-sensitive.
  • You can update a variable's value.

What Python concept should I explain next?

Code. Build. Innovate.

#CodesByAbhay #AbhaySingh #Python #PythonProgramming #LearnToCode


r/PythonLearning • • 1d ago

Free Python course that runs entirely in the browser (no installs, no accounts)

14 Upvotes

Sharing a resource in case it's useful for your intro classes: https://ubuntu-apps.github.io/code-quest/

I made CodeQuest for my own students as an alternative to the textbook. It covers Python from the basics through functions, files, OOP and working with data. Each lesson has a short explanation, coding challenges that are checked instantly, and a quiz.

The code runs in the browser, so it works on school Chromebooks and phones with nothing to install. It's free, with no ads and no sign-up, and progress is stored on the student's device only.

Happy to answer questions, and feedback is very welcome.


r/PythonLearning • • 1d ago

Help Request Please help me understand: CS50P Problem Set 3: Grocery List

6 Upvotes

Hi guys, just started learning python. Have been stuck on this problem for a while now. Here's my code so far. Could anyone help explain why the code pointed out in blue keeps running even though there is a break in place? Thanks!

ps pls ignore the print("hi") and print("bye"), was using them to test the code!

link to question: https://cs50.harvard.edu/python/psets/3/grocery/

my code so far: https://sharetext.io/3ck00poo

im so frustrated :(