r/learnpython • • Jun 04 '26

Where should I start to learn python?

1 Upvotes

Hi! So basically I am going to university in the fall and would like to learn python this summer. What is the best method to learn and become relatively good? Should I start at YouTube? Khan academy? Courses? Any advise would be greatly appreciated.


r/learnpython • • Jan 19 '26

Returning to Python after years out — looking for a crash refresher that actually works

1 Upvotes

Hey everyone,

I’ll be blunt: I used to work as a developer, but it’s been years. Python and SQL feel like a foreign language again. I have all the time in the world to focus and grind, but I don’t have the money for fancy paid courses.

I need something practical — brutal, hands-on, something that forces me to code, not just watch videos or read slides. My goal is to spend up to 8 hours a day and come out confident enough to build a small project or app that actually works.

I saw codedex.io — it looks solid, the way it forces you to code is exactly what I want — but I worry the free tier won’t be enough, and the paid tier is out of reach.

Has anyone been in this situation? Is there a free path, guide, or roadmap that ramps you up in Python and SQL fast, without months of beginner fluff?

I feel sad and frustrated that I let my skills sit for so long. I just want to get back before I forget everything, and I’ll throw all the time I have at it. Any practical advice would mean the world.


r/learnpython • • Aug 30 '26

Learn Python

1 Upvotes

Hey Everyone,

I'm an electronics student but I wanted to start learning python through videos but the problem is that there are a plethora of videos available on YouTube and I cannot decide which one to choose.

If possible can anyone drop some suggestions on which channel to learn from...it would be really helpful

Thanks.


r/learnpython • • Mar 18 '26

How do I run an sql server on a local host that can be interacted with python?

1 Upvotes

I have created a database in SQLite and can access it only from my current device, and I have a local http server running in python. Is there any way I can use this to run my database so it can be accessed by any device on the local network? If not is there anything else I can do, everything I can seem to find online points towards using port forwarding and buying a domain for a website. Thanks in advance :)


r/learnpython • • Jul 12 '25

Unable to use python

1 Upvotes

So this is the thing: i'm starting with python and i installed it yesterday, which took a little over 30 mins to install, however when i tried launching jupyter lab, it wouldn't launch, on the screan said the page couldn't load as if i didn't have access to internet. In the task admin tbe cpu and memory were over 70 or 80%. Btw i downloaded anaconda.

Searching on the anaconda website it said it need at least 16 ram memory and mine is 8. My question is how can i be able to use python if anaconda is too demanding with my laptop and right now y can't change any hardware and i think it is from 2017 so i'm not able to update to windows 11 and my disk is i5.

I've seen something about creating my own environment and downloading miniconda and jupyterlab but not sure how that works and if just installing that, my laptop will not have any problem running it? Or if there is another solution.

Sorry if this is too long and messy.


r/learnpython • • 3d ago

Function without argument

1 Upvotes

Ive got a function that takes a dictionary as an argument.
Now Id like to program it so when the function is called without any argument, instead of an error message it prints something custom (a dictionary for example).

Any help is appreciated :D


r/learnpython • • Jun 11 '26

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

0 Upvotes

I've been following various courses for about three months now. I feel like I have a decent grasp of the basics—I understand loops, lists, dictionaries, and I can write basic functions without looking them up every five seconds. But the second I close a tutorial and open a blank VS Code window to try and build something from scratch, my brain just completely freezes up.

I know what the syntax is, but I have no idea how to actually structure a project or even where to start with the logic. I find myself constantly drifting back to following a video because it feels safer, but I know that isn't actually teaching me how to think like a programmer.

For those of you who have been doing this for a while, how did you break out of that cycle? Did you just start with tiny, useless scripts, or did you try to tackle a big project right away? I'm trying to find that middle ground where I'm actually building something functional without needing a step-by-step guide holding my hand through every single line of code. Any advice on how to approach problem-solving when the solution isn't laid out in a video would be huge.


r/learnpython • • Oct 20 '26

La duda que tengo.

1 Upvotes

Hace no mucho decidí por mi cuenta aprender python de manera autodidacta y con cursos al menos con certificación o con instituciones que son reconocidas para ir a la universidad ya preparado. -Cualquiera puede buscar un curso y puede buscar una institucion que de videos para aprender como es el caso del MIT o Harvard que dan cursos gratis o videos enseñando solamente que no muchos averiguan- y mi pregunta es. Sirven esos cursos? Alguna recomendación? Y por último pero no menos importante... Porque dicen mucha gente que la programación o algo que tenga que ver con tecnología es para gente introvertida o "Virgen"? Entiendo que tu trabajo no será estar con muchas personas o tan siquiera con personas y estarás en una computadora. Y te puedo decir yo que soy la persona más -al menos a mi pensar- expresiva o sociable que hay al menos en mi grupo de amigos. Eso y que pues no me parezco en nada a lo que plantean o dicen las personas. Me han dicho que hasta parezco que estudio/practico otra cosa que eso.


r/learnpython • • Apr 15 '22

Python syntax, any alternative to tabs for loops?

24 Upvotes

Are python code blocks really done with tabs? Is there no option to use some kind of close or end statement for loop or if blocks?

This is so weird to me! I have never seen a langauge syntax based on white space, am I being dumb or what?

The learning/tutorial resources I've used so far, just give an example with tabs and move on, with no mention of the syntax itself, as if it's no big deal or common knowledge or something.

Edit: I deserve more downvotes, big noob here


r/learnpython • • Aug 13 '26

HELLO GUYS!

0 Upvotes

hi i’m a college student and we are tasked to picked a community where we are absolutely not familiar. Can you state some specific acronyms you use here about pyhton, slang terms and inside jokes unique to this group? PLEASEEE, A SIMPLE COMMENT WILL SURELY BE APPRECIATED! ps: been scrolling for 1 hour and I can’t find one🥹


r/learnpython • • Jul 15 '25

I just installed python and but i don't know very much on what should i learn first as an non-programmer

4 Upvotes

I just installed python and i'm really lost in every tutorials i see on youtube, what should i learn first in programming python to understand and code?? (actually my main reason and purpose on installing python and posting this because my group in our practical research subject here in our school aka my classmates, proposed an idea that we will make an finger print locker desk drawer system as an research to conduct and some of my classmate told us that our proposed idea or title includes programming, but we don't know a thing about programming) so yea here i am posting this


r/learnpython • • Aug 05 '24

It's been 4 hours, what am i missing?

4 Upvotes

Something is wrong with my code on the mooc.fi Helsinki course for python this is the leap year question in part the 4th section of part 2 https://tmc.mooc.fi/paste/MeorB64S-YVuOjn6Jjso5w

the question is Please write a program which asks the user for a year, and prints out the next leap year.

Sample output

Year: 
2023
The next leap year after 2023 is 2024

If the user inputs a year which is a leap year (such as 2024), the program should print out the following leap year:

Sample output

Year: 
2024
The next leap year after 2024 is 2028

Please write a program which asks the user for a year, and prints out the next leap year.à

This is the solution i came up with

|| || ||*# Write your solution here*| ||year = int(input("Year: "))| || | ||while True:| ||if year % 4 == 0 and (year % 100 != 0 or year % 400 == 0):| ||print(f"The next leap year after {year} is {year + 4}")| ||break| ||elif year % 4 != 0 and (year + (4 - (year % 4))) % 100 == 0 and (year + (4 - (year % 4))) % 400 != 0:| ||print(f"The next leap year after {year} is {year + 4 + (year % 4)}")| ||break| ||else: | ||print(f"The next leap year after {year} is {year + 4 - (year % 4)}")| ||break|

UPDATE: GOT IT DONE TODAY, TOOK ANOTHER 20 MINUTES BUT WHO CARES IF ITS MORE CODE, JUST MAKE IT MORE CLEAR, I WILL SIMPLIFY LATER check it out here

# Write your solution here

year = int(input("Year: "))

while True: 
    ## covers 2020 1980 etc
    if year % 4 == 0 and (year + 4) % 100 != 0:
        print(f"The next leap year after {year} is {year + 4}")
        break
    ## covers 1896 1796
    elif year % 4 == 0 and (year + 4) % 100 == 0 and (year + 4) % 400 != 0: 
        print(f"The next leap year after {year} is {year + 8}")
        break
    ## covers 1596 1196, etc
    elif year % 4 == 0 and (year + 4) % 100 == 0 and (year + 4) % 400 == 0:
        print(f"The next leap year after {year} is {year + 4}")
        break
    ## covers 2019 2013 1010
    elif year % 4 != 0 and (year + (4 - (year % 4))) % 100 != 0:
        print(f"The next leap year after {year} is {year + (4 - (year %4))}")
        break
    ## covers 1897
    elif year % 4 != 0 and (year + (4 - (year % 4))) % 100 == 0 and (year + (4 - (year % 4))) % 400 != 0:
        print(f"The next leap year after {year} is {year + 8  - (year %4)}")
        break
    else: 
        print(f"The next leap year after {year} is {year + 4 - (year % 4)}")
        break

r/learnpython • • Feb 05 '24

Ive been learning for about 25 hours but still have no clue how python works

0 Upvotes

Im a beginner programmer, learned a little bit html and then switched to python. I use both w3schools and learnpython. I can understand the instructions very well, i just dont memorize them. Its too much infirmation and it just falls out of my brain.

Why is doing anything more than printing simple text, so hard? Why do I make so many mistakes in the things ive already learned multiple times?

Is python/programming not for me, or does everyone struggle so hard?


r/learnpython • • Nov 07 '19

1/3 of 1% of the total human population are coders

4 Upvotes

when you feel like giving up just remember what you are quitting.


r/learnpython • • Jul 08 '25

What is the problem?

0 Upvotes
import pdfplumber

def zeige_pdf_text():
    with pdfplumber.open("Auftrag.pdf") as pdf:
        erste_seite = pdf.pages[0]
        text = erste_seite-extract_text()
        print(text)
    
if__name__=="__main__":
    zeige_pdf_text()

Thats my code and in the terminal it always shows me that:     

if__name__=="__main__":
                          ^
SyntaxError: invalid syntax

Idk what I did false? It would be great to get a fast answer:)

r/learnpython • • Jul 30 '25

What is pylance bad?

0 Upvotes

Is pylance bad and is it actually better or is it just marketting? Just started to learn Python, it adds more chaos to my work then actual being useful


r/learnpython • • Nov 12 '25

Resources to Start Learning Python

0 Upvotes

I've recently been trying to start learning python, but the free online courses I have tried havent really stuck. I feel like I need a more fully layed out entire translation guide on how the language works sort of thing to just start and memorize a few fundemental concepts. Is there a book or something else I can buy or access that would align with this vision?


r/learnpython • • May 21 '25

Suggest a good youtube channel to learn python

0 Upvotes

I know very basics of classes ,objects , function. What to learn python as hobby


r/learnpython • • Jun 18 '26

New to learning what did I do wrong

0 Upvotes

Ticket_count = 1

Ticket_price = 3

Total_cost = (ticket_count * ticket_price)

If yes == yes:

Print(input(' how many would you like?')

Print(total_cost

When I get to this point the print out will print out the number of tickets on one line and then 3 on the next line and not give me to total instead


r/learnpython • • Jan 20 '25

How to learn Python as a chemistry post graduate for research purpose?

0 Upvotes

I'm in the 2nd year of my master's program in chemistry and I want to learn python for my research in chemistry, particularly inorganic chemistry. I have zero previous knowledge on programming.

Where can I start and how? Please help.

EDIT: Wanting to learn for these purposes:

  1. Organizing data and performing statistical analyses on experimental results from NMR or IR spectroscopy.

  2. Reaction setup calculations

  3. Simulating chemical reaction kinetics or calculating thermodynamic properties

  4. Computational Chemistry


r/learnpython • • Jul 30 '25

Learning python

0 Upvotes

Hello, I’m trying to learn some basic level python for a research project. Does anyone know any good tutorials I could follow?


r/learnpython • • Oct 27 '25

I learned Python basics — what should I do next to become a backend dev?

0 Upvotes

Hey everyone,

I just finished learning Python basics (syntax, loops, functions, etc.) and now I’m kinda stuck. My goal is to become a backend developer, but I’m not sure what the best path forward looks like.

I keep seeing people say “learn DSA,” “learn SQL,” “learn frameworks,” “learn Git,” — and I’m not sure what order makes sense.

If anyone has a good roadmap or resource list that worked for them, I’d love to see it. I’m trying to stay consistent but don’t want to waste time learning random things without direction.Thanks in advance! Any advice or experience you can share would mean a lot 🙏


r/learnpython • • Feb 12 '26

I want to make robots with human intelligence – is this Python roadmap worth it?

0 Upvotes

Assalamualaikum!

I want to choose a field where I can program or build robots with human-level intelligence. After researching with AI chatbots, I found that my field is AI, Machine Learning, and Robotics Engineering.

I’m a beginner in Python, and I found this roadmap: Python Roadmap. I want to know honestly – is it worth it for me to follow this roadmap to reach my goal?

Also, I want advice on:

  • Are there better ways or resources to learn Python for AI & robotics?

  • As a beginner, what should I focus on to really improve?

I would really appreciate honest and practical answers. Thank you!


r/learnpython • • Mar 27 '25

Is it me or is python handling optional arguments incorrectly?

0 Upvotes

I know this is not the place to report bugs, but I think I found one. If this is not a bug, then could someone explain why this happens?

I was starting to write a python script that uses command line arguments. I have an optional --RunTest argument. I noticed when I started typing the optional argument, say --R, it actually accepted that as a valid argument. This goes for --R, --Ru, --Run, --RunT, --RunTe, and --RunTes. I would not expect it to work for those, but rather only --RunTest. Below is the code I am referring to. I am using Compiler Explorer, Python 3.13.

import logging
import sys
logger = logging.getLogger(__name__)
logFormat = '( %(asctime)s | %(levelname)s ): %(message)s'
logging.basicConfig(level = logging.DEBUG, format = logFormat)

def Test():
  logger.debug('Start Test()')
  logger.debug('End Test()')

# Class containing the command line arguments
class CommandLineArguments:
  def __init__(self):
    self.mPosArg = ''
    self.mRunTest = False
  def __repr__(self):
    return (self.mPosArg, self.mRunTest).__repr__()
  def isEmpty(self):
    import pathlib

    # Purposely omitting self.mRunTest here
    return self.mPosArg == ''
  def Equals(self, aRhs):
    # Purposely omitting self.mRunTest here
    return self.mPosArg == aRhs.mPosArg
  def ProcessCommandLine(self):
    # Set up command line arguments
    # Usage:  `python scripy.py [--RunTest]`
    import argparse

    parser = argparse.ArgumentParser(description = 'scripy.py parameter parser')
    parser.add_argument('PosArg', nargs = '?', default = '', help = 'A positional argument')
    parser.add_argument('--RunTest', required = False, action = 'store_true', default = False, help = 'Runs the test procedure.')

    # BUG:  `--R` sets RunTest
    #       `--Ru` sets RunTest
    #       `--Run` sets RunTest
    #       `--RunT` sets RunTest
    #       `--RunTe` sets RunTest
    #       `--RunTes` sets RunTest
    #       `--RunTest` sets RunTest (expected)
    args = parser.parse_args()
    print(args)

    # Check arguments when not in --RunTest mode
    if not(args.RunTest):
      pass

    # Store arguments
    self.mPosArg = args.PosArg
    self.mRunTest = args.RunTest
    print(self)

scriptCLAs = CommandLineArguments()
scriptCLAs.ProcessCommandLine()

# Handle --RunTest mode
if scriptCLAs.mRunTest:
  Test()
# Handle normal execution
else:
  pass