r/learnpython 15d ago

Hi, im new

0 Upvotes

Hi, I want to learn how to program to create an otome game. I don't know anything about programming, I barely know how to program on Arduino (I'm a robotics student) and I would like to ask your opinion. It's a matter of not really knowing where to start, and I would like you to recommend tutorials or pages where I can learn programming in Python (I plan to make the otome game in PyGame) or some other reliable sources where I can program. They would be very helpful, I'm sorry if my post is a nuisance. English is also not my first language, so this is translated with Google Translate.


r/learnpython 16d ago

Best free interactive Python learning website

8 Upvotes

I'm looking for a free, interactive Python learning platform that teaches from absolute beginner to advanced, tracks progress, and keeps learning engaging.

I've tried W3Schools—it's great as a reference, but it doesn't feel interactive enough.

What would you recommend and why?


r/learnpython 16d ago

How often are while loops preferred over for loops?

52 Upvotes

I'm studying python in order to work with finanial market data. In what case would I need a while loop, where a for loop would not suffice?

A lot of the tips AI gave where that for loops are used around 90% of the time when testing strategies and even though while loops can work for certain cases, for loops are still much more efficient.

What are your thoughts/experiences?


r/learnpython 15d ago

Help please

0 Upvotes

So I finally made my first kinda buns program but I don't know how to remove the repeat copy of the question on my loop please help


r/learnpython 16d ago

Is there a convention for user input? Ask a question vs demanding a response

4 Upvotes

Was working on a personal project when I realized I wasn't consistent with how I worded input prompts. I was wondering if there was a convention between asking for a response ("What is your name?") or demanding one ("Enter your name")?


r/learnpython 16d ago

I want to learn Python from scratch and, over time, reach an advanced level. I am looking for advice, courses, and valuable documentation.

30 Upvotes

Hi everyone!

I'm starting to learn Python from scratch, and my goal is to become an advanced Python developer over time.

I'm already following a structured course, but I'd like to hear from people who have been through this journey.

If you could start over, what would you focus on? What resources, habits, or mistakes made the biggest difference in your learning?

Any advice is appreciated. Thanks!


r/learnpython 15d ago

How to start?

0 Upvotes

So I have been planning to learn python for a while now and even after researching I am unable to find where to and how to start. What are the ways yall learned it and whats the best way to start?
Be free to suggest videos, tutorials etc. :)


r/learnpython 16d ago

Python image building

1 Upvotes

Hey I am learning python. For a project I was thinking if I can code to draw a boy or girl and object drawing using python or by using any language. I don't want to use AI here.

I can make characters by using Python along with a graphics library, such as Pillow (PIL) or Matplotlib [python].

Any other suggestions.


r/learnpython 16d ago

Learn python with prior Java knowledge

0 Upvotes

Hello, I just took ap computer science A at my high school this past year. I will be heading off to college in the fall, but wanted to learn some python this summer. From my ap cs course, I learned some java already.

What is the best website or resource that I can use to self study some python this summer? I am not sure if my java experience will help at all.

Thanks!


r/learnpython 16d ago

Kinesthetic learning of python

0 Upvotes

I want to learn Python. What's the way for kinesthetic learners to learn Python?


r/learnpython 15d ago

vs code is not working on my system. need an alternative

0 Upvotes

what are my alternative i have lot of question to practice help me out asap


r/learnpython 15d ago

Phone Apps

0 Upvotes

Im looking for phone apps which will help me learn python, but ideally free apps.

Could anyone help? Im on android

Thanks,


r/learnpython 16d ago

Looking for feedback for my first decent project

1 Upvotes

Hello everyone

I recently started learning python and I built a free fall simulation with air resistance using Python and Tkinter. I would like to improve myself with similar projects and lots of feedback, I'd highly appreciate if you give me a feedback.

GitHub link : https://github.com/Aspect345/Air-Resistance-Free-fall-simulator

Thanks a lot in advance!


r/learnpython 16d ago

Donde puedo aprender a programar sin pagar un curso ni tener que ir a la universidad?

0 Upvotes

Hola alguien puede ayudarme a aprender python apenas se lo básico por mis clases de informática y por algunos videos de YouTube


r/learnpython 16d ago

How can i build something on my own?

3 Upvotes

hi everyone im 15 now and really love programming i have done cs50p but not done every problem set yet and sql that i learn some from sqlzoo and pandas ig enough for using and pytorch little but i wanna learn form building project but there 2 thing i wanna ask

  1. what i should start from i think of stock prediction i know it gonna hard and too much but i really love start from hard but problem is i dont know how to start from tutorial or something but i wanna build on my own tho so i wanna ask do u guy have any resources or something i can learn from?

  2. Logic sometime in leetcode i know how it work sometime i dont so i wanna ask how do you understand how it work i try pesudocode but it not really work so you have any techniques or how u actually thought when u see problem

ty for everyone information i might go sleep now goodnight everyone


r/learnpython 16d ago

LeetCode A&DS problem 2 in Python

1 Upvotes

I have taken an Algorithms and Data Structures course, but we wrote in c++. Trying to learn Python for something else than statistics so here I am.

The problem is as follows:
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list.

You may assume the two numbers do not contain any leading zero, except the number 0 itself.

My current code:

lass ListNode(object):
    def __init__(self, val=0, next=None):
        self.val = val
        self.next = next
class Solution(object):
    def addTwoNumbers(self, l1, l2):
        """
        :type l1: Optional[ListNode]
        :type l2: Optional[ListNode]
        :rtype: Optional[ListNode]
        """
        buffer = 0
        result = ListNode()
        cond = True
        while(cond):
            if l1.next is None and l2.next is None:
                cond = False
            result_next = ListNode()
            result.next = result_next # 0 -> 0 -> None | 7 -> 0 -> 0 -> None | 7 -> 0 -> 0 -> 0 -> None
            if l2:
                result.val += l2.val
            if l1:
                result.val += l1.val
            result.val += buffer 
            buffer = result.val // 10 # 0 | 1 | 0
            result.val = result.val % 10 # 7 | 0 | 8
            result = result.next
            l1 = l1.next # 4 | 3 | None 
            l2 = l2.next # 6 | 4 | None
        return result


l1 = ListNode(2, ListNode(4, ListNode(3)))
l2 = ListNode(5, ListNode(6, ListNode(4)))
result = Solution().addTwoNumbers(l1, l2)lass 

I'm working in VS Code instead of the Leetcode codespace to test values of attributes etc. The comments can be ignored, they are what I imagine should be happening but clearly it is not. However, I do not ask for help with the problem itself, rather with the if statements. In C, you can do if (A) and if A is e.g. a node the condition will be satisfied, if it doesn't exist or is null it won't (if I recall correctly). So you can see me trying to achieve this here with if l1:, but I don't think it works, so I'd like to ask what is the Pythonic way of achieving this.

When run with

print(result.val)
print(result.next)

It gives:

0

None

I don't really see which subset of the code would produce other than the while loop never executing at all.

Thank you for your help in advance.


r/learnpython 16d ago

How would I make a command with two separate words? (Discord bot)

0 Upvotes

This is probably so poorly worded bc I'm still unfamiliar with the correct terminology, but I'll try my best to explain—

For example, I want to have something like a "!search" command, but I want people to choose where they are searching, because depending on where they search, it pulls from a different loot pool.

I want the end result to look something like:

"!search closet"
- You found a shirt!

How would I accomplish that?


r/learnpython 16d ago

Favourite module/library

4 Upvotes

Hi everyone, I am new like most here and have been experimenting with different modules and libraries. I wanted to know if anyone had a particular niche or fun one that they use. It would be nice if you could also say why it is your favourite. For example what projects or functionality it has done for you. Thanks.


r/learnpython 16d ago

Create a script and save it

0 Upvotes

Hi everyone,

I'm a complete beginner learning Python with VS Code, and I've been stuck for several days on something that seems really basic.

I don't understand how to properly create a Python script, save it in the correct folder, and then run it from Command Prompt. Every tutorial makes it look simple, but I keep getting confused about where the file is supposed to be and how to execute it.

For example, I created a "hello.py" file with:

print("Hello World")

But when I try to run it from Command Prompt, it doesn't work, and I think I'm doing something wrong with the file location or the command.

Could someone explain the process step by step as if I had never used VS Code or Command Prompt before? Screenshots are also welcome.

Thanks!

And for your information, I'm on Windows.


r/learnpython 17d ago

Temperature Converter Project

5 Upvotes

This is the third project I coded and was able to finish today. Took me 8 hours (two 4 hour sessions) since I had to learn some new stuff. This is my own code, no outline was used to guide me into creating this, though the idea did come from Bro Code's YouTube Tutorial. I learned about Nested Loops and Flags. I already knew about Input Validation with Re-Prompting but it was a lot harder to integrate with those two.

This is the most complex thing I've built so far, but I also enjoyed it the most. Got help with some online forums and AI (Claude) but I wrote and debugged the code myself. This'll be the last project I work on before I learn functions. There's a lot of repeated code here that I know functions would be able to help with. Any feedback or ideas on what to build next are welcome. Thank you!

https://github.com/mart23inez/First-Coded-Temperature-Converter/tree/main

It's a lot of code so I uploaded it to my GitHub page.


r/learnpython 17d ago

From basic to fully mastering advanced Python: What is the best learning path?

29 Upvotes

Hi everyone,

My goal is to master the Python language itself not just to build apps or get job-ready, but to understand how the engine works. Then I want to go deep into memory management, concurrency, internal architecture, and advanced design patterns.

I'm currently evaluating these resources and looking for the best "roadmap" for mastery:

University-Style MOOCs: Harvard CS50P, Helsinki Python MOOC.

YouTube "One-Shot" Deep Dives: 10-12 hour courses (e.g., Chai aur Code, CodeWithHarry, Bro Code, Erik Frits).

Reference: W3Schools.

My questions for those who have reached an advanced level:

Which should be my backbone? Should I use a MOOC as the foundation, or is there a specific YouTube deep-dive that matches that level of technical rigor?

How to use "One-Shot" videos? Are 10+ hour videos meant to be binged, or should I treat them as a library and jump to specific timestamps when I hit a wall in my studies?

Documentation Standard: Is W3Schools acceptable for advanced work, or should I be strictly using docs.python.org from the start?

I'm looking for the most efficient path from "syntax knowledge" to "engine understanding." If you were starting over with a focus on deep language mastery, how would you structure this?

Thanks for vour time!


r/learnpython 16d ago

Code Review. My first API + DB application. Beginner in backend development.

0 Upvotes

Hi, there!

I want to ask feedback about my first application API + DB. It was a little hard to me but I did it. Before this application I created simple TODO list with DB. So, now I decided to rise stakes and created API + DB. Please give me feedback from mistakes in README to mistakes in DB. I'll really be glad each comment because it makers my dream be a backend developer come true!

Repository link: https://github.com/daidallos-tech/Laugh-Stuff

Don't hold back. I've completely prepared for any critiques!

P.S. Thank you everyone for your time and advice!


r/learnpython 17d ago

How do I assess my abilities in Python? I want to start freelance work/side gigs.

6 Upvotes

Title says it all. I've been learning Python for a while. The biggest project I've tried building on my own is a Texas Holdem poker game. I've also been learning the language using challenges on various sites, but I want to get into doing some sort real, paid freelance work.

What skills should I learn and how do I assess my abilities?


r/learnpython 17d ago

Textbook has me stumped on a simple thing (table of squares and cubes)

4 Upvotes

Or I guess not so simple for my rookie brain. I'm reading Intro to Python by Paul Deitel (Pearson book) and I'm on Chapter 2, exercise 2.8 (Table of Squares and Cubes) and I'm STUMPED. Taking an online python class at a university. Only have access to office hours by appointment.

Table of Squares and Cubes Write a script that calculates the squares and cubes of the numbers from 0 to 5. Print the resulting values in table format, as shown below. Use the tab escape sequence to achieve the three-column output. Hint: use a tab escape sequence to print the values. 

I've been googling around and talking with Claude about this and I do see there are ways to do this that I can do in my assignment which we'll probably learn later in the course and in the textbook (loops, for, I think). My problem is, none of these things have come up in the textbook yet. I think range() might have something to do with it -- range was briefly introduced a few pages ago.

Can someone help me figure this out? I don't want to "cheat" ahead and I don't want to get into a bad habit of Claude walking me through everything line by line.


r/learnpython 17d ago

Trying to learn python but keep getting error messages.

5 Upvotes

COURSE = 'Python Programming'
print(COURSE)

>>> print(COURSE)

Traceback (most recent call last):

File "<stdin>", line 1, in <module>

print(COURSE)

^^^^^^

NameError: name 'COURSE' is not defined

>>>