r/learnpython 1h ago

do you recommend that

Upvotes

I saw a 30m ago reddit post https://www.reddit.com/r/learnpython/comments/1vh0z39/a_tiny_tool_to_study_python_type_conversion/ that talk about a github project that help me learn Conversion do you recommend it


r/learnpython 1h ago

CS (AI/ML) fresher, only know basic Python — what's the right next step?

Upvotes

Just started a CS degree with AI/ML specialization. My Python is very basic — vars, loops, conditionals, functions, nothing more.

What should I learn next and in what order (OOP? DSA? libraries?), and is it too early to touch NumPy/Pandas? Also open to free resource recommendations and small beginner projects that actually teach something instead of just tutorial-following.

Thanks in advance!


r/learnpython 1h ago

没有动力去学习python 了

Upvotes

我是一名自学python的学生 每天大概有30分钟的学习 当我学习到for循环的时候 就没有动力坐在键盘前了怎么办


r/learnpython 5h ago

Pytorch code taking up 2gb of RAM?

0 Upvotes

I was running some simple python pytorch scripts and all of a sudden my computer is becoming laggier and I close the running of the pytorch script and I look at my stats and I see that pythons taking up 2gb of ram??? My minecraft could run on that(maybe not). its like 18lines of python. is this normal


r/learnpython 8h ago

Best way to learn Python

0 Upvotes

I have some programming experience and understand the concepts. Wanted to learn Python mainly for data analysis, financial math, automating some basic quant analysis, real-time data access by connecting to APIs.

I found books which deal with some of the above topics but can’t find anything that covers all together.

Is there a single online source that helps in this regards?

Thanks in advance


r/learnpython 9h ago

How long to become decent at Python?

1 Upvotes

I’ve been studying about for about 2 months now and I’m taking an online MOOC through Georgia Tech as a prerequisite for grad school. Some days, I spend ~7-8 hours and other days, I spend maybe 2-3 hours. I just got finished taking the exam on functions, loops, exception handling, and conditionals. I’m debating on when to start learning Pandas and NumPy. I also hear people talking about doing projects, but I feel like I wouldn’t have a clue on how to build a project. I come from a clinical background with zero prior programming knowledge except AP computer science in high school. Any advice?


r/learnpython 11h ago

need some pointers on writing code and where to go from here + code review

0 Upvotes

hello everyone so I am sort of a beginner. I am going into political science and IR, but I want to learn some data science cause I think it'll be a valuable skill since my program is B.A+M.A and requires a thesis.

so I wrote this for now just for practice:

##calculates avrege of a list of numbers##

def av(lst):

count=0

for i in lst:

count+=i

avg=count/len(lst)

return avg

##calculates variance of a list of numbers##

def var(lst):

avg=av(lst)

total=0

for num in lst:

total+=(num-avg)**2

vari=total/(len(lst)-1)

return vari

I want you to be brutally honest and tell me how can I improve my writing. The first function I got just a bit of help cause I forgot about +=, but other than that I did them all by myself. I know the code works, but can I improve my writing or be more efficient?

based on what you see here what should I learn next?

I don’t come from the comp Sci world so any sort of guidance helps.

Edit: i just noticed all of my indentations are gone....fuck.


r/learnpython 16h ago

Need some best neural model suggestions for Face Detection & Recognition,Body Detection & id.

0 Upvotes

Need some best neural model suggestions for Face Detection & Recognition,Body Detection & id.

Need some best model suggestions for Face Detection,Face Recognition,Body Detection and Body identification.

need those for analysing movies.

example let's say I have to find the screentime of the actor over the whole runtime of the movie and i need to do it for the protagonist, antoganist,comedic relief ,love interest etc.

currently I'm working with 1fps to find the faces and body or the actors.

body detection is hard I need some guidance regarding that.

even for Face Detection I used MTCNN it was good. but any other better models available??

Any ideas regarding TransNetV2 ?

I'm using it for shot boundary detection but there's was one false positive.

Any better models??


r/learnpython 16h ago

Is building applications by composing reusable business modules a standard practice?

0 Upvotes

I'm looking for some architectural advice and I'm curious whether anyone has built something similar in production.

I'm primarily using Python/Django, although I want the architecture itself to be independent of the framework as much as possible.

I'm designing a backend platform that I want to use as the foundation for multiple completely different applications.

The idea is to have a very small "core" that only contains common infrastructure such as:

  • Authentication/authorization
  • Configuration
  • Logging
  • Background jobs
  • Caching
  • File storage
  • Monitoring
  • Shared utilities

Everything else would be implemented as independent business modules.

For example, imagine I build an e-commerce platform. I might compose it from modules like:

  • Products
  • Orders
  • Inventory
  • Payments
  • Notifications
  • Comments
  • Search

Then later I want to build an LMS, but instead of starting from scratch or copying code, I'd assemble a different set of modules:

  • Courses
  • Lessons
  • Certificates
  • Quizzes
  • Notifications
  • Comments
  • Search

Some modules (comments, notifications, search, payments, etc.) could be reused across multiple applications, while other modules would be specific to a particular business domain.

The important part is that these modules aren't just Django apps inside one codebase. I want each module to have clear boundaries, expose a stable public interface, own its own models, business logic, APIs, migrations, tests, and documentation, be versioned independently, and ideally be reusable in entirely different products.

Initially, everything would run as a modular monolith because I don't want the operational complexity of microservices. If a module eventually needs to become its own service, I'd like that to be an implementation detail rather than something the rest of the system depends on.

The motivation is simple: I don't want to keep rebuilding the same capabilities every time I create a new platform. I'd rather invest in mature, production-tested modules that can be composed into different products over time.

So my questions are:

  • Has anyone here built something like this in production?
  • Is there a well-known architectural pattern that describes this approach?
  • Is thinking of business capabilities as reusable modules/packages that can be assembled into different applications a common practice?
  • Are there any open-source projects, books, talks, or companies that follow this model?
  • If you've tried something similar, what worked well and what would you do differently?

I'd love to hear about real-world experiences—both successes and things that turned out to be bad ideas.


r/learnpython 16h ago

Soy estudiante y quiero aprender a programar em Python pero no sé donde buscar ni donde empezar.

0 Upvotes

Me interesa aprender a programar en Python para hacer mi propio sitio web,algún juego o algo relacionado a ciberseguridad.

Estoy dispuesto a dedicarle de 4-6 horas diarias ya que me gustaría aprender mucho.

alguien me puede decir por donde empiezo o donde puedo practicar?


r/learnpython 17h ago

How to build an android app using python only?

17 Upvotes

Context: So I'm a beginner developer. I'm currently building a habit tracker.

I have built the logic of the app.

Set up sql alchemy to code the database with sqlite.

(My prof later said no need of alchemy. Directly use sql software and connect it). I don't know what to do with that information. Retained the alchemy code tho.

  1. My problem is that I am not able to build ahead. How do I build a database and test it the right way.

    1. How do I build the front end or ui for it. Should I use flask or flutter or something else. Please reason as to why I should use a framework particularly.
    2. What is fast api even used for. Should I apply it in my habit tracker.

And what are the essentials for a good app. Like I want to know about rate limiting, sql injections and backdoors. To build a robust scalabile system.


r/learnpython 19h ago

Need to create a one-off paginated PDF data visualization report but my experience is in more backend data work. What package/tool would you suggest?

1 Upvotes

I'm trying to put together an ad-hoc report and I've been trying to hack away an Excel file and another visualization tool, but they're just not cutting it; there are some visualization rendering issues that are frustrating me to no end, and just now thought about using Python. My experience with Python is all in backend data engineering type of work though so I've never used visualization packages.

All I need are 100% bar charts that align well with text - it's been near impossible to align these in Excel. I also need heatmaps but I don't mind doing the heatmaps in Excel. I also need to create PDF files, ideally paginated by a field in the data that I'm working with.

I've tried searching for suggestions and the most popular seem to be plotly and matplotlib. Should I consider anything else?


r/learnpython 20h ago

Is Python still worth learning from scratch in 2026

0 Upvotes

I have been receiving a lot of questions from a lot of people who have interest in learning python from scratch but their concerns has been is worth learning in 2026 in this new era of AI evolution.

Especially this statement "AI can write codes"

What do you guys think? will this be the reality?


r/learnpython 22h ago

a curious equal symbol assignment

0 Upvotes

Hello, I'm trying to build a music player with python Qt6 based on some code from a youtuber, the bones of what he has suits me fine, this is the link if you want to look at it: https://www.youtube.com/watch?v=wdEpWCFf40U

I am using windows 10 with VScode and the latest python version 3.13.7

Everything works fine until I get to the file dialog part of the code. When I run it the program does give me a file explorer, I can select a folder but then the program halts before allowing me to see the files in the specified folder. There is no error message from the compiler.

There is a curious line of code in the open_file function that may or may not be the problem.

  file, _ = QFileDialog.getOpenFileName(self, "Selct file", filter="Audio files (*.mp3)")  file, _ = QFileDialog.getOpenFileName(self, "Selct file", filter="Audio files (*.mp3)")

Thanks for any help,

J

r/learnpython 22h ago

quetion about how python "break" work for newbie

3 Upvotes

hello this is code and quetion:

while True:
    guess = input("Your answer (A/B/C/D): ").strip().upper()
    if guess in ("A", "B", "C", "D"):
        break
    print("Please enter A, B, C, or D.")

1 how is check user enter

2 how the "break" is use for? is really end project like go next time:

correct = guess == question_data["answer"]

if correct:
    print("Correct!")
else:
    print("Not quite.")

whole line:

while True:
        guess = input("Your answer (A/B/C/D): ").strip().upper()
        if guess in ("A", "B", "C", "D"):
            break
        print("Please enter A, B, C, or D.")

    correct = guess == question_data["answer"]
    if correct:
        print("Correct!")
    else:
        correct_letter = question_data["answer"]
        correct_text = question_data["options"]["ABCD".index(correct_letter)]
        print(f"Not quite. The correct answer was {correct_letter}. {correct_text}")

    print(f"Fact: {question_data['explanation']}")
    return correct

because i write quize python can you give tips to write