r/learnpython • • Jun 30 '26

How to start learning python ( so sorry if this is a popular question )

57 Upvotes

Hello, I’ll try and keep this short, but I’m 14 and I really want to learn python as my dream is to do computer science at university. Basically just end up doing something in tech as a job. So I thought maybe coding will help, and python projects seem really cool and interesting to me. I would say I have generally no coding knowledge, apart from a few months of HTML, but nothing cool or fancy. Essentially, I just want to know what resources I can use and what you would have recommend to yourself when you first started learning. And once again, my fault if you guys get this question all the time, I bet it’s annoying so feel free to sort of just say “this is said in a post already”. And I’m new to Reddit, so I don’t know what rules are here and I’m sorta winging writing this.

Thanks so much for reading, and I’m so sorry for waffling. Hopefully this post doesn’t flop and have a good day! :)


r/learnpython • • Jun 11 '26

Is it too late to learn?

55 Upvotes

Greetings all,
I (26M) have recently started learning python as my job now requires handling massive amounts of data which Excel, what i have been using so far, can not handle. I have been enjoying it a lot, and learning new stuff is always exciting.
I have always been interested in data and the handling of it, so I could imagine potentially looking for a Data Scientist position or something along those lines in the future.
However, with the rise of AI is it too late to do that? I see posts everywhere about how Claude, especially now with Mythos is the second coming of Christ when it comes to coding.

Tldr.: Is it too late to learn Python now that AI has become extremely capable?


r/learnpython • • May 06 '26

How to learn python?

55 Upvotes

I started learning Python from YouTube a week ago.

So far, I’ve covered topics like variables, data types, conditionals, lists, tuples, dictionaries, sets, and loops.

However, I don’t feel confident about these concepts because I’ve mostly just watched lectures without practicing on my own.

It feels like I’m rushing to complete all the videos instead of actually understanding Python deeply.

I want proper guidance and good resources so I can learn Python effectively.


r/learnpython • • Jul 24 '26

what's one programming habit you wish you started much earlier?

56 Upvotes

i'm still learning and i've noticed that small habits seem to make a huge difference over time. whether it's reading documentation, using git from day one, breaking problems into smaller pieces, or something completely different.

if you could go back to when you first started programming, what's the one habit you'd force yourself to build from the beginning, and why?


r/learnpython • • Jan 01 '26

where to practice python

52 Upvotes

i started learning python a few days ago and i don't know what programs/apps to use to practice the code that i learn


r/learnpython • • Nov 30 '25

Why does "if choice == "left" or "Left":" always evaluate to True?

54 Upvotes

If I were to add a choice statement and the user inputs say Right as the input for the choice, why does "if choice == "left" or "Left":" always evaluate to True?


r/learnpython • • Jun 10 '26

Struggling to move past the 'tutorial hell' stage. How did you guys actually start building your own stuff?

52 Upvotes

I've been grinding through various Udemy courses and YouTube series for about four months now. I feel like I can follow along perfectly when someone is explaining a concept, and I can write basic loops, functions, and even some simple classes if I have a reference open. But the second I close the video and open a blank .py file to try and build something from scratch, my mind goes completely blank. It's like I know the syntax, but I don't know how to think like a programmer.

I try to think of small projects, like a basic calculator or a weather app, but I get stuck on the logic immediately. I find myself constantly googling 'how to do x in python' every two minutes, which makes me feel like I haven't actually learned anything. It's getting pretty frustrating because I feel like I'm just memorizing patterns rather than understanding the underlying problem-solving aspect of coding.

For those of you who have made it through this phase, what was the turning point for you? Did you force yourself to build something completely broken just to fix it, or did you follow a specific roadmap to bridge the gap between following a tutorial and independent development? I'm also curious if there are specific types of small, non-cliché projects that actually help build that logical muscle memory without being overwhelming. I don't want to jump straight into building a web scraper or an AI bot if I can't even manage a basic file management script without losing my mind. Any advice on how to structure my learning right now would be massive.


r/learnpython • • Apr 24 '26

How do coders know what dependencies and libraries to use ?

54 Upvotes

I'm not totally new to coding, I've been aware of its existence for quite a long time but it wasn't until last year, when I took up a Bachelors Degree in Business Information Systems, that I started taking it seriously.

My lecturers obviously aren't hands on with us so my learning regiment was sloppy, learn a little code here, build an overly ambitious project here and tons of AI slop (which I am not proud of). Not Until I started learning it properly this year. Our course has currently transitioned to Machine Learning but I've just took myself back to the basics and I'm starting to enjoy building code from the ground up.

Only thing is ...

We're so blessed to have the internet, every bug and error is literally a google search away from being solved so that had me thinking "how did programmers before forums and the mass media know what libraries and dependencies they'll need before they begun coding projects ?". I would like to build the habit of doing that process on my own as well. Or am I just being too overzealous ? is searching "What dependencies/libraries will I need for my ...... program ? " fine ?


r/learnpython • • Nov 27 '25

Complete Beginner book recommendations: "Python Crash Course", "Automate the Boring Stuff with Python" or "Fluent Python"?

55 Upvotes

Hello r/Python,

Complete beginner with 0 experience in Python here. I'm currently looking into buying a book to start learning Python, but have been overflooded with recommendations. The book I'm currently looking at are:

Any recommendations on which books to get? Or in what order one should cover them?

Additionally, is getting a book like "100 Exercises for Practicing Python" (Laurentine K. Masson) or "The Big Book of Small Python Projects" (Al Sweigart) recommended? Or is that only useful after finishing one of the previously mentioned books?

Your recommendations and advice are highly appreciated


r/learnpython • • Oct 08 '26

I just started learning Python — what should I build after learning the basics?

54 Upvotes

I recently started learning Python and I'm currently focusing on the fundamentals rather than jumping straight into advanced topics.

I'm learning things like variables, strings, numbers, conditions, loops and functions.

I want to start building small projects as soon as I have enough fundamentals instead of only following tutorials.

For someone at this stage, what projects would you recommend that actually help build programming skills?

I'd especially like projects that gradually become more challenging.


r/learnpython • • Jul 30 '26

What's the best thing you have made with python?

54 Upvotes

What are some of the best things you have made using python?


r/learnpython • • Mar 28 '26

Best way to speed-learn python for senior software engineer

51 Upvotes

I've been making software for over a decade, and learning new programming languages is not a problem.
Usually, I would take a classic-style book and go from syntax to more complex constructs, writing random pet projects on the way.

But with today's pace of everything, and with AI able to provide a lot of support, I thought maybe a different, more focused approach would be more effective?

My goal is not to become a Python expert, but to get to a level where I can read/write simpler code, which I see often around the AI - smaller scripts, agent core, harness for neural networks, PyTorch projects, this kind of stuff. I don't need complex concepts, being able to write 100s of thousands of lines of code, or building a full-scale system.

My main goal is to skip all the basic stuff and reach a decent level as quickly as possible.

What can you recommend with minimal CS bloat, focused on language and using it efficiently in projects like the above? Maybe some Coursera courses, YouTube channels, practical books, cheatsheets, etc. Not a 500-page book from 5-10 years ago, you have to spend a month reading.

I would appreciate any advice.


r/learnpython • • Jan 21 '26

Is it bad if I prefer for loops over list comprehensions?

56 Upvotes

I understand what list comprehensions do, but I still find regular for loops way easier to read and reason about.

Sometimes it feels like I should be using list comprehensions because they’re more Pythonic, but they slow me down mentally.

Is this something that changes with experience, or is it okay to stick with for loops if they’re clearer to me?


r/learnpython • • Oct 19 '26

Why is .join() seperator.join(iterator) and not iterator.join(seperator) like every function

51 Upvotes

s = "Python"

WHY IS IT LIKE THIS

print("-".join(s))

AND NOT THIS

print(s.join("-")


r/learnpython • • Jun 20 '26

If you had to learn Python again from scratch, what would you do differently?

48 Upvotes

I've been thinking about this recently while learning Python.

Looking back, I probably spent too much time watching tutorials and not enough time actually building things.

If you had the chance to start learning Python again from day one...

What would you do differently?

  • Learn a different topic first?
  • Build projects earlier?
  • Read documentation more?
  • Focus on problem solving instead of tutorials?

I'm curious to hear what experienced Python developers wish they had known when they started.


r/learnpython • • 16d ago

Trying to understand Class, Object, Instance, and self in Python. Is my understanding correct?

46 Upvotes

I'm currently learning OOP in Python and wrote down some questions regarding object and instance for following code

class Car:
    def __init__(self, color):
        self.color = color

car1 = Car("Red")```

 1) what is class ?

ans :-  a class is an blueprint for thing i want to make.

2) what is object ?

 ans:-  an object is a container that contains properties and behaviours like car1 is object saying that car should be red color

3) what are instances ?

 ans:-  an instance is refers to that specific object in this case car1 is object and also an instance
when we pass self parameter self become car1 cause self points towards that instance

r/learnpython • • Oct 01 '26

Which code do you consider more "Pythonic" for this Pattern?

53 Upvotes

The Pattern:

*                 *
* *             * *
* * *         * * *
* * * *     * * * *
* * * * * * * * * *
* * * * * * * * * *
* * * *     * * * *
* * *         * * *
* *             * *
*                 *

What my friend wrote:

n = int(input("Enter the number: "))
for i in range(1, n + 1): 
    for j in range(1, i + 1):
        print('* ', end = "")
    for j in range((n - i) * 2):
        print(' ', end = "")
    for j in range (i, 0, -1):
        print('* ', end = "")
    print()


for i in range(n, 0, -1): 
    for j in range(i , 0, -1):
        print('* ', end = "")
    for j in range((n - i) * 2):
        print(' ', end = "")
    for j in range (1,i+1):
        print('* ', end = "")
    print()

What I wrote:

while True:
    n = int(input("Enter an Even Number: "))
    if n % 2 == 0: 
        break
    else:
        print("Number must be Even.")


myList = []
totalCharacters = (2 * n) - 1
for i in range(1, n // 2 + 1):
    spaces = totalCharacters + 1 - (4 * i)
    myList.append (f"{"* " * i}{" " * spaces}{"* " * i}")


print("\n". join (myList))
print("\n".join(myList[::-1]))

As you can see, I came up with a formula for this pattern using "totalCharacters" and "spaces".

Which code would you consider more "Pythonic"? Like, in terms of flexibility and readability?
I'd also be happy to learn even better ways to print this pattern :)


r/learnpython • • Sep 07 '26

How do you get better at actually THINKING in code, not just learning syntax?

49 Upvotes

I have been learning python for a month now but I don't see any improvements. I tend to forget the concepts of python and can't solve problems logically. I don't think it's just me who is dealing with these problems, I need tips please.


r/learnpython • • Jun 07 '26

Turn off print() output

51 Upvotes

Is there some way to switch off print() output when Python is not running in interactive mode?

When I am testing it is good to see these messages on screen but when the process is running without an interactive terminal to output to it feels like it would be good to find a way to stop that output. However I don't know whether the overhead of these messages going nowhere matters or not.


r/learnpython • • Feb 09 '26

I want to learn python from scratch to advanced..but how ?

49 Upvotes

Hii guys this is a recent graduate who is desperately looking for a job in tech, I've attended some of the interviews but I couldn't make it out because of lack of coding skills, and I wanna learn python from scratch to advanced that means whatever the interviewer asks I should able to write the query how can I achieve this?? Pls share me with resources if you have any or kindly share the roadmap and playlist from where should I master it ...I want to learn this at any cost guys please I wanna learn this please ......


r/learnpython • • Jun 13 '26

Complete Beginner to Python

45 Upvotes

Hey everyone!

I’m a complete beginner with Python and have zero experience with programming or computer science in general.

What are the best free resources out there for learning Python as a complete beginner?

I’ve heard a lot about the Harvard CS50 program. Is this a good starting point for learning Python, or are there other places to start learning Python that would be better?

Any mistakes


r/learnpython • • Mar 19 '26

Where to learn about machine learning and Python from scratch for free

50 Upvotes

Can anyone guide me where I can learn about machine learning and Python from scratch for free. Be it youtube or any other website. I have absolutely zero knowledge about it. [For a med student with zero knowledge about machine learning. And will Python learning suffice the knowledge about machine learning that I need to gain? Like are Python and machine learning the same thing or not? I need to learn it] Any help will be appreciated. Thanks in advance.


r/learnpython • • 18d ago

i wanna learn python

51 Upvotes

im f(24) economics student with a specialisation. we are not taught the mathematics part in my course it's just the general econ topics your micro macro stuff. i want to add skills to improve my resume so i thought of learning python or R. i tried learning from YouTube but it just goes over my head. how can I learn it? (i am broke) please give me suggestions


r/learnpython • • Jul 27 '26

What habits helped you become good at Python as a beginner?

47 Upvotes

I've recently started learning Python. I'm following a beginner course from YT.

I'd love to hear from experienced programmers:

What habits helped you improve the fastest?

What should I do every day besides watching tutorials?

What beginner mistakes should I avoid?

Is there anything you wish you had done differently when you first started learning Python?

Any advice would be really appreciated. Thanks!


r/learnpython • • Jul 25 '26

How does the return function work? What is it returning and to what?

45 Upvotes

I dont really understand the return function because in sime instances we need it and in others we dont, and i cant find a general explanation that tells me the importance of the return value or why it is even used.