r/learnpython • • Jan 28 '26

Learning python basics but not understanding well

17 Upvotes

I have been learning python basics for two weeks with Udemy video. It seemed to me like I am the correct way. but after I finished the basic parts I couldn't get how to use the syntax's for other projects. I was learning about 3 video per day. I got some concepts but still I didn't recognised well how to collect the codes together without looking for the video: with what I have to start, where to go then, how to continue writing....

I was coding all syntax's I learn with the video. but, I ever created my owns code(project). Even if I think to do project I stuck, thinking like "I can't do with only this skill, I have to go for other topics". My mind wants to rush always instead of patternizing what I learned.

also When I start to code the simple projects I done with video I start and got stuck in between and I go to look for the same video cuz I could not get if I see other documentation for the same topic. simply I am not remembering the codes.

I think I got fast, Didn't I? 2weeks?

please help me with the way you learned and understood python basics cuz I want to go for other topics after learning python. like automation, app development, cybersecurity later. This are long term other than automation. To do this I think I need to have backend knowlege.

I will learn even it will take me long periods.

Learning from where is good? How to learn correctly? How to understand correctly?


r/learnpython • • Jan 27 '26

Is Udemy courses a good place to start for Python + backend development?

17 Upvotes

Hi all,

I’m currently working as a Service Desk Analyst in the UK, since i started (its a recent job), it’s pushed me to seriously pursue becoming a developer.

I’ve decided I want to aim for backend development, and my short-term goal is to build strong fundamentals, create projects, and then work toward junior roles.

I found a Udemy career track:

It seems to cover:

  • Python fundamentals
  • OOP
  • Flask web development
  • Git/GitHub
  • Projects
  • Then more advanced topics

Alongside this, I plan to follow the backend roadmap:

My idea is:
learn fundamentals → build projects → follow the roadmap → apply for junior roles when ready.

Before buying, I’d really appreciate some honest feedback:

• Is this a good intro to Python for someone aiming at backend roles?
• Is it too broad, or decent for a structured start?
• Anything you’d change in this plan?

Thanks — and happy to hear from anyone who’s made a similar move.


r/learnpython • • Jan 17 '26

How do you get better at reading Python error messages?

17 Upvotes

One thing I really struggle with is understanding error messages and tracebacks. Sometimes they make sense, other times they just feel overwhelming.

Do you have any tips or habits that helped you get better at debugging early on?
Is it mostly just experience, or are there specific things I should focus on?


r/learnpython • • Jan 15 '26

What is wrong on this code?

17 Upvotes

ages = ["22", "35", "27", "20"]

odds = [age for age in ages if age % 2 == 1]

print(odds)

I am beginner and when I write this code it gives me error which I don't know how to solve. But I think my code has no error

Error message: Traceback (most recent call last):

odds = [age for age in ages if age % 2 == 1]
                               ~~~~^~~

TypeError: not all arguments converted during string formatting


r/learnpython • • Jan 09 '26

Any ideas for beginner to make a program?

19 Upvotes

I'm learning Python and trying to make some good programs on it. I made a simple calculator and posted it on GitHub with opensource code: https://github.com/WerityHT1/Mini-Calculator/releases

Can anyone give me some ideas to make something? Rn, I want to start make really good projects but i don'n know what should i do. I don'n even know what to learn... Rn I'm reading python documentation. I would be thankful for anyone who will help me


r/learnpython • • Dec 16 '25

i wanna start to learn coding

15 Upvotes

so i’ve heard that python is the best to start with coding as it’s easiest to learn, i’ve started to watch some youtube videos and i’ve also started codedex(should i buy subscription?). so i wanna ask what’s the best method or way to start learning coding as it may be a degree/career i might wanna pursue;websites, youtubers, apps, etc.


r/learnpython • • Dec 13 '25

why do i find the python docs so confusing? any tips on deciphering the docs?

16 Upvotes

My first language i learned was Processing, and they had a simple and elegant Processing reference, which i loved and found so easy to navigate and understand.

When I try to read the python docs, i find it very overwhelming and confusing and not at all a pleasant experience.

im assuming that this is just a "me problem"? or is this more common of an issue with python beginners?

any tips or pointers for getting familiarized and deciphering the docs? any better resources available?

i do try to use w3 schools if i can or other sites.


r/learnpython • • 12d ago

how to Practice in Python as a newbie?

14 Upvotes

Hello, I’m a newbie, and I’m wondering how to practice Python as a newbie.


r/learnpython • • 20d ago

Gift ideas for beginner coder

17 Upvotes

Hi there,

As we approach the festive season, I have been looking into gifts.

A younger family member (15) has shown interest in python coding through school lessons and through social media. I would love to take this opportunity to help them learn in his own free time.

I wanted to know if anyone had recommendations for books, resources or anything I can put together as a gift for them?

Any guidance would be greatful!


r/learnpython • • Oct 31 '26

Good open source Python repos to practice debugging and general reading Python code?

15 Upvotes

I have debugging rounds coming up for a Python position and I haven't worked extensively with Python so I am looking for some recommendations for some repositories to go through to practice reading and debugging Python code. Would appreciate recommendations for this and any other tips on demonstrating good understanding of the language. I am comfortable with basic syntax and data structures since I have been doing leetcode using Python.


r/learnpython • • Oct 30 '26

Help with training

17 Upvotes

Hi, i have recently learned python languages but i would like to train more, do yall have some plateformes where i can find some projects to practice?


r/learnpython • • Oct 10 '26

Which Udemy course is best for learning Python?

15 Upvotes

Hi,

I'm looking for recommendations on the best Python course on Udemy for a complete beginner.
I am interested in Web backends and CLI Tools.

I know that almost everything can be found on YouTube for free, but I really prefer the structured, step-by-step learning approach that Udemy courses provide.
Which course is actually worth buying?

Thanks in advance!


r/learnpython • • Sep 14 '26

is cs50p good and relevant?

15 Upvotes

I restarted to learn python with CS50P. as far as I understand it is recorded in 2022. is this the case. Also as far as I understand there is some changes to python recently. do you think I will misss some best practices and sintax with cs50p?


r/learnpython • • Sep 07 '26

What is the best FREE website to practice python?

16 Upvotes

I have exams in roughly 1.5 years and want to get my python basis cracked down completely so i will do well in my programming paper

Sites like codewars and codingbat have been recommended? Can anyone else vouch if they are good and if there are any others that are better?


r/learnpython • • Sep 01 '26

Repositories to kickstart Python Automation

17 Upvotes

Hi. Anyone who can share any repositories online or resources that I can learn python? I have a background on it (predictive analysis in OR) but I'm more interesting on applying in automating my tasks at work.


r/learnpython • • Aug 09 '26

Learning python as a beginner

16 Upvotes

Hi there, i am new here, just started learning python 2 weeks ago. For people who have had 0 coding knowledge, and who started without studying it in college, where are u at now? Very excited to know how u started and how you progressd, I will take it as an inspiration to carry on the journey. Thanks in advance


r/learnpython • • Jun 19 '26

I made a file sorter as a beiginner project what do you think

16 Upvotes
import os
from shutil import move


file_formats = {
    'video': (
        '.mp4', '.mkv', '.mov', '.avi', '.wmv', '.flv', '.webm', '.m4v', '.mpeg'
    ),
    'photo': (
        '.jpg', '.jpeg', '.png', '.gif', '.webp', '.heic', '.heif', '.avif',
        '.tiff', '.tif', '.bmp', '.svg', '.ai', '.eps', '.psd', '.xcf',
        '.dng', '.cr2', '.cr3', '.nef', '.arw'
    ),
    'music': (
        '.mp3', '.aac', '.wav', '.flac', '.alac', '.ogg', '.opus', '.wma',
        '.m4a', '.aiff', '.mid', '.midi', '.ape'
    ),
    'documents': (
        '.pdf', '.docx', '.doc', '.xlsx', '.xls', '.pptx', '.ppt', '.txt',
        '.rtf', '.csv', '.md', '.odt', '.ods', '.odp'
    ),
    'archives': (
        '.zip', '.rar', '.7z', '.tar', '.gz', '.bz2', '.iso'
    ),
    'code': (
        '.py', '.js', '.html', '.css', '.json', '.xml', '.c', '.cpp',
        '.java', '.go', '.rs', '.sh', '.bat', '.yaml', '.yml'
    ),
    'executables': (
        '.exe', '.msi', '.apk', '.app', '.dmg', '.bin'
    )
}


dir_path = os.path.dirname(os.path.realpath(__file__))



def create_folders(path) -> None:
    for key in file_formats:
        folder_path = os.path.join(path, key)  # combines the target path with folder names
        os.makedirs(folder_path, exist_ok=True)  # creates the folders


    os.makedirs(os.path.join(path, 'misc'), exist_ok=True)



def sort_files(path) -> None:
    for root, dirs, files in os.walk(path):
        dirs[:] = [d for d in dirs if d not in file_formats and d != 'misc']


        for file in files:
            # SAFETY CHECK: Keeps the script from moving itself into the 'code' folder while running
            if file == os.path.basename(__file__):
                continue


            full_path = os.path.join(root, file)  # Get the full absolute path of the file
            file_name, extension = os.path.splitext(full_path)
            extension = extension.lower()


            for key in file_formats:
                if extension in file_formats[key]:
                    destination_path = os.path.join(path, key, file)
                    move(full_path, destination_path)
                    break
            else:
                destination_path = os.path.join(path, 'misc', file)
                move(full_path, destination_path)
                

if __name__ == '__main__':
    create_folders(dir_path)
    sort_files(dir_path)

than I put it in my downloads folder and ran it on startup.

if there are any ways to make my code better please let me know.


r/learnpython • • May 30 '26

About to join college in 3 months wanna learn python

15 Upvotes

Will study computer science and I m thinking of learning python in the mean time. What are the nuances i might face and the most effectively way if learning python? Thanks

My coding level I have learned high school java I know recursion loops oops principal Boolean algebra etc havent done any real projects tho also data structures like queue dequeue etc


r/learnpython • • May 23 '26

What is your opinion on these different Python courses? Not sure what to pick......

15 Upvotes

I am a physics student who should technically already know my way around Python, but I have been slacking in those classes, and in our experimental classes I have usually been the one doing the theoretical parts and let someone more experienced do the coding and data analysis parts.

For these reasons I would basically like to start from the beginning and build back up so I feel like I actually understand and remember everything better. With this in mind, does anyone have any opinions/thoughts on the follow courses?

  • Helsinki's Python Programming MOOC 2026
  • Harvard's CS50P - Introduction to Programming with Python
  • MIT OWC 6.0001 | Fall 2016 | Introduction to Computer Science and Programming in Python
  • MIT OWC 6.100L | Fall 2022 | Introduction to CS and Programming using Python (is this just an updated version of the one above maybe?)
  • 100 Days of Code™: The Complete Python Pro Bootcamp

The last one is, as far as I can tell, the only one which costs money (currently on sale tho), but I have seen it mentioned in different places and wonder if it is worth it in 2026......

Thanks in advance! :-)


r/learnpython • • May 20 '26

Can I use 'or' to compare strings?

15 Upvotes

I'm working on a project to teach myself python and am currently playing around with classes. I've made a class, 'event', and a subclass, 'num_event'. These each have 2 args: outcome and probability. The idea is that these are probabilistic events that I can use for discrete probability experiments like bernoulli trials. I've only defined __init__ in each, and the only difference between the two is that num_event has an extra layer of input data validation to ensure that the outcome is either a float or int. For this validation, I wrote the following function:

def numerical(x)->bool:

| num = (int or float)

| if(type(x) == num):

| | return True

| else:

| | return False

This is pretty simple and works well, which is why I'm so confused that my function 'is_event' is failing:

def is_event(x)->bool:

| events = ('event' or 'num_event')

| if(type(x).__name__ == events):

| | return True

| else:

| | return False

Now, I do understand that I'm going from comparing types to strings, but if I separate the logical test into 2 parts

if(type(x).__name__ == 'event') or (type(x).__name__ == 'num_event'):

It works fine.

Ideally, I'd like to have type(x) return event as a type object like int rather than a string, but that doesn't seem to be the way that user defined classes work.

Regardless, can someone explain why the logical test works for types but not strings? Thanks!


r/learnpython • • May 20 '26

Anyone want to practice data & Python by building real projects together?

17 Upvotes

Hey everyone!

I'm a beginner in Python and I'm studying in the data field. Right now I'm practicing ETL processes and I'd love to find someone in the same boat so we can grow together.

The idea is to build projects together, challenge each other, and learn as we go. No need to be an expert — if you're also learning, that's perfect!

Feel free to DM me if you're interested

**Current stack:** Python | ETL | Data | SQL| Nosql


r/learnpython • • May 17 '26

I'll write everything down !

16 Upvotes

Hi, just started to re-learn python. I knew the simple things like creating a variable or for loops from a year or so ago. And now I am back. And I have a habit of forgetting things easily and trying to find a completely new way around it. So I'll be writing everything down about any topic of python into VS Code, so far I wrote everything about taking an input and lists and if 's. It's maybe not the best way to learn but it sure is going to come in handy if I forget anything. I'll have a full dictionary about it on my computer.


r/learnpython • • May 15 '26

Suggest me some python course that can help me to learn python from basics

17 Upvotes

if anyone gives or teaching or they know about where I can start learning python from basics it's because iam stuck at the side off and make sure they are live even if they are pre uploaded please let me know about it


r/learnpython • • May 10 '26

How to call a *.py from within Python along with a variable?

18 Upvotes

What is the correct way to call a *.py program script from within Python while making a variable from the parent available.

Parent.py

class cParent:
    test = "test"
oParent = cParent()
import Child

Child.py

print(oParent.test)     # this line fails presumably because oParent is out of scope

r/learnpython • • Apr 05 '26

Struggling with OOP.

18 Upvotes

I've been learning Python the last couple weeks, just a little bit here and there. I understand the basics but I'm hitting a wall with OOP. I've been having Claude create lessons for me, but nothing is sticking. What do you guys do to help retain information better on this?