r/learnpython • • Apr 24 '26

How to actually learn Python T-T

0 Upvotes

I’m a first-year computer science student, and we’re learning Python—loops, file reading, recursion, tail recursion, etc. I just can’t figure out how to actually learn and solve problems. I feel like I’m failing right now. I scored 3/30 on my midterm exam. I prepared so hard for it, but I think I’m not learning correctly. When I code, I feel like I’m just guessing or relying on memory. I’ve tried many practice problems, but I end up memorizing the solutions. When I face a similar problem, I struggle T-T


r/learnpython • • Oct 24 '25

Which is the most important language for a backend developer?

1 Upvotes

hello everyone I started recently web backend developer course to where should I start please help me
I couldn't figure out how to strat which language choose first please suggest me And how much time will be required to learn it completely?


r/learnpython • • Aug 22 '26

is it possible to simplify this code

0 Upvotes

im a beginner, idk how python works yet. there must be a way to simplify this, right?

https://imgur.com/juBvPZD here is the picture of my code


r/learnpython • • Oct 18 '26

learn python

6 Upvotes

Hello guys, i recently started a bachelor degree which i have a subject about introduction to python, inicially i was confident and did understand how to use python, but week by week it started to get much more difficult to follow. So im here to ask if someone knows any youtuber or website which explains the fundamentals of python in a easy way. Thanks in advance.


r/learnpython • • Mar 18 '25

What's the best source for learning Python?

0 Upvotes

Hello people!

A quick introduction about me: I'm a Mechanical Engineer graduate planning to pursue an MS in the computational field. I've realized that having some knowledge of Python is necessary for this path.

When it comes to coding, I have very basic knowledge. Since I have plenty of time before starting my MS, I want to learn Python.

  1. What is the best source for learning Python? If there are any free specific materials that are helpful online on platforms like YT or anything, please go ahead and share them.

  2. Are Python certificates worth it? Do certifications matter? If yes, which online platform would you recommend for purchasing a course and learning Python?

  3. Books: I have Python Crash Course by Eric Matthes (3rd edition), which I chose based on positive reviews. Would you recommend any alternative books?

If there are any free courses with it's certification. Please drop their names as well :)


r/learnpython • • Jan 31 '25

Hello, I started learning Python two months ago and now I don't know what to do or where to find exercises to increase my learning

0 Upvotes

python


r/learnpython • • Apr 27 '24

Any chatbot to correct python code and help to improve it?

0 Upvotes

I am a beginner to python and just learnt its basics, I have taken some exercises from chat gpt but if I find difficulty in writing the code for it, chat gpt seems to provide little to no help to correct my code in most cases.

If anyone uses or knows an AI chat bot/ generative AI that can be used for this purpose?


r/learnpython • • May 23 '24

How can I make python give more than one output at a time?

0 Upvotes

How can I make python give more than one output at a time? For example if I type the following code:

'spam'*3

5+9

The it will only return '14' in the output while leaving out 'SpamSpamSpam' but if I were to reverse the order then it only prints 'SpamSpamSpam' in the output while leaving out '14'. Why Can't I have both? Or what must I change in the code to make it print out both


r/learnpython • • Nov 16 '25

Learn python

0 Upvotes

I have been studying for govt exam from past 3 years and i have not able to succeed and rn i want to work again so i m thinking of learning python and choose it as my career but i am a newbie in this field i have no programming language knowledge. So is it a good career option and can you please tell me some sources that helped you learn it from absolute scratch.


r/learnpython • • Nov 05 '25

Python for juniors

0 Upvotes

I want to start learning Python and reach the Junior level. Could you share some advice on what I need to do to reach this level and not burn out?


r/learnpython • • Aug 11 '25

i dont know wat im doin, pls help

0 Upvotes

wsg everyone, im a newish pythoneer ( a term i created for python users),

I have this project im workin on and im a bit stuck any help and tip will be greatly appriciated

(it says somthing about invalid syntax with the numbers)

ty

# Get width input (5-10)
width = -1  # Start with invalid value
if width < 5 or width > 10:  # First check
    width = int(input("Enter width of swing (5-10): "))
    if width < 5 or width > 10:
        print("Out of range, please re-enter...")
        width = int(input("Enter width again (5-10): "))  # Second chance
        if width < 5 or width > 10:
            print("Using default width 5")
            width = 5

# Get steps input (10-50)
steps = 0  # Start with invalid value
if steps < 10 or steps > 50:
    steps = int(input("Enter number of timesteps (10-50): "))
    if steps < 10 or steps > 50:
        print("Out of range, please re-enter...")
        steps = int(input("Enter steps again (10-50): "))
        if steps < 10 or steps > 50:
            print("Using default steps 20")
            steps = 20

r/learnpython • • Jan 04 '26

Not able to create Logic of my own

0 Upvotes

hey! I started learning "Python." everything is going good, but when I'm trying to solve questions on my own, at that time I'm not able to create logic of my own. It felt like I don't know anything about python. It seems like my 🧠 is completely empty.
what should I do?


r/learnpython • • Dec 30 '25

checking if the word is the same

0 Upvotes
#This program will ask you to guess the number.
name=input()

print('Nice to meet you '+name+'!')

import random

number=random.randint(0,100)

print("Let's play a hot and cold number guessing game, shall we?")

print("I'll pick a number and you will try to guess it in 10 or less tries.")

answer=input('Ready? ')

if answer.lower()== 'yes' or 'ready':

  print('Ok')

else:

  print('Having second thoughts?')```

I keep getting 'Ok' as an answer. I'm a complete beginner so any advice or solution is appreciated!

r/learnpython • • 26d ago

As a beginner what should I be focusing on first.

0 Upvotes

I just started coding, it’s been a hobby of mine for a couples weeks so I know a lot of the basics. I usually pick a random topic to learn in python and learn a little bit about it and move on to the next. Should I be following a list of things to learn in python in order or is it ok to learn some of the hard stuff first and jump back to the easier things.
Sorry if my paragraph doesn’t make sense, English isn’t my first language.


r/learnpython • • Dec 25 '24

What types does for loop accept?

0 Upvotes
def print_all(x: ???):
    for item in x:
        print(item)

what should the typehint for the parameter be?

I guess collections.abc.Iterable, but I'd be surprised if for loops don't also always work with Iterators too, and Iterators don't have to also be Iterables


r/learnpython • • Jun 24 '24

Cant seem to find my way with python and career

0 Upvotes

I recently made a career change and chose Python. In my 2 weeks of learning, I am still unsure if it is the right language to learn (I only took it because I heard that it's English-like). I was recently making the infamous triangle using "*" and I came across the very same code but written in C++ although it not being English-like, it made sense to me more than the python one.

Kindly help me find my path. I can't seem to figure out which line of work I should pursue. Web dev, data analysis, AI, machine learning, etc. I at times feel as if I should've started with javascript because I took a class on web development way back

if you guys have any advice to give to a beginner I'd be glad.


r/learnpython • • Oct 24 '24

Is it enough?

0 Upvotes

Is starting programming from w3school a good option ? Will it cover everything? Any reviews?


r/learnpython • • Nov 13 '24

Question about libraries

0 Upvotes

I don't understand how I should learn libraries. Let me explain: reading them I often don't understand what is written, it's all so difficult and technical. So I think "maybe I should watch an introductory video?" but I don't do it because it seems ethically wrong, I think I should learn by myself and not relying on someone's help every time. Can you tell me how you understand a library? Or a set of libraries needed to create a type of application (even more difficult since I don't even know which library to start with).


r/learnpython • • Jun 30 '22

help I'm new at python

0 Upvotes

id = input("enter your password: ") print(id == 369)

Why when I enter 369 in the console it displays false?


r/learnpython • • Dec 11 '23

Hi, I want to learn python

0 Upvotes

I want to learn python. Can someone recommend a utube channel or something


r/learnpython • • Feb 29 '24

How to not forget python ?

0 Upvotes

I feel everytime I learn something I forget it, is it normal or am I just waiting to have Alzheimer's?


r/learnpython • • Mar 06 '24

Too tired to Python some nights

0 Upvotes

I've been posting here recently, and have had some good feedback, even coming up with small app ideas, which is cool

I'm now a father of two.. and some nights I'm just too bloody tired to do more Python lol


r/learnpython • • Sep 01 '24

Dumb question but I’ll still ask it.

0 Upvotes

How do you stay motivated while learning Python, or really anything in general? I feel like I'm not improving, and I forget what I've learned when I try to go back and code. The most frustrating part for me is the indentation—it’s challenging, but I try to embrace the process. I love sports and hope to work on cool projects in the future. I’ve been "coding" for about 3-6 hours a day, but it seems like I forget everything I learned the next day. Maybe I’m exposing myself to too much Python content. I could really use some encouragement.


r/learnpython • • Feb 12 '21

Python Seems Broken To Me As A Language/Distribution; Perhaps You Can Set Me Straight

0 Upvotes

While this is a bit of a rant, a rant often means the ranter is missing something important which nobody has bothered to make clear to them. So, I hope you will indulge me and point out where I have gone wrong.

  1. Anaconda: As far as I can tell, someone decided to make a wrapper for pip simply because they thought typing pip was somehow beneath them and preferred typing conda. This project seems to serve no other purpose than to act as a substitute for pip or, if not, the additional benefits of Anaconda appear to be negligible. What have I missed?

  2. Pyenv: How hard is it to either type the name of a python binary or create a sym. link to a particular python binary with a distinct name and then type that? pyenv seems to be nothing more than a desire to complicate an otherwise-simple situtation.

  3. Virtual environments: If you are so scared your project might interfere with something else to the point you feel compelled to isolate the packages with a virtual environment, you have likely structured your project wrong. I have worked in software for over twenty years in C, C++, C#, python, VB.net, JavaScript, TypeScript, Haskell, etc., etc., etc. and the only time I have ever had to work with projects where someone utilized the idea of a virtual environment, or analog thereof, have been python projects. Every other language allows you to easily structure your project and isolate libraries in a way which does not involve such potential system-wide shifting of the ground from underneath the developers' feet. In my opinion, running venv should only print a message to standard out which reads "You have done something wrong; review your project plans."

  4. Documentation: While this problem is not unique to python, I tend to find issues in python-project documentation more than any other language; maybe this is a testament to the popularity of the language, in which case "good for you but bad for many people, like me, trying to do something". Installation is as simple as "pip install blahblahblah"; great, what if I want to uninstall or reinstall or what if something was working before and now, for no obvious reason, python is raising exceptions which make no sense? For example, suppose I receive an import error "dlopen(foo.so, 2): library not loaded: absurdlyCrypticName.dylib; referenced from foo.so; reason: image not found"; this is not helpful. I have no idea what was tried. I have no idea what the context was in which such a try was attempted. I will likely have no idea how to resolve the issue even if I can somehow discern what sort of library is involved with "absurdlyCrypticname.dylib"; yes, I could try pip install ... and yet many times that doesn't work. Web searches often turn up nothing useful and hours, if not days, are wasted trying to figure something out with respect to an otherwise useful tool which could have been avoided if someone thought to use a reader-friendly name for the library, to give a bit more than a single line of context into a binary file, and to give some suggestions.

Maybe I am the only one who feels this way. Maybe I am too stupid to do a job I have been doing quite well for over two decades. Maybe every other developer is a psychic who sees no problem with their projects being structured poorly and who is insulted by the name "pip". Maybe it really is just me.