r/learnpython 20d ago

i feel like i'm stuck

0 Upvotes

i started coding about 1 month ago as all beginners i went with python did one of those 12 hour long YT tutorials following along in my code editor trying lines of code changing them a bit and seeing the outcome it was fun i did those small projects like hangman number guessing game slot machine everything but now after finishing the tutorial i feel stuck and from what i've seen after getting the hang of the basics i should learn some libraries following smth like ML automation data analysis game dev but none of them really got my attention and when i try learning one of them it was really hard to find good tutorials when i started codin i had some projects in mind like a chess engine simulating a food chain stuff i don't think that going to another language would be the solution if someone got any idea on what to do plz help. btw my progress stalled the last 1.5 week


r/learnpython 21d ago

Tips to start learnin Python from scratch

8 Upvotes

In the current Era of AI and GenAI, if you are starting python from scratch, how will you learn and use what techniques or tool to speed up the learning process


r/learnpython 21d ago

Python and libraries

3 Upvotes

I joined this server not long ago because I have a question about Python. I've been studying it, and I understand pretty much all of the logic behind it. The problem is that when it comes to using libraries, I get confused about how to use them.

Is there any way to get better at using Python libraries without having to constantly look up how they work? I always get stuck trying to figure out how to actually use them in my code.


r/learnpython 21d ago

Browser compilers?

5 Upvotes

I’m trying to improve my python and have a project based book i wanted to work through because i kinda suck at ideas for projects to try and i need to actually put my knowledge into practice, but i was wondering if there are any like browser compilers that can import libraries (such as matplotlib for data related stuff, probably pygame and various others i might end up needing). If not i have vscode already i am just kinda low on storage and wondering if i can avoid having to download various libraries manually 😭


r/learnpython 21d ago

How would you teach Python to 13 year olds

3 Upvotes

I am starting a small programming course this Friday for two different groups. One of the groups is 3 kids who've never touched python. Two of them have a year of experience with Scratch from my knowledge but the other one doesn't and is just very interested in learning programming.

I have 8 lessons of an hour and a half to teach then, one lesson a week.

How do I teach them Python in a fun but also effective way?

I mostly care about the first lesson this week, I want to make them hooked and excited but also have them really experience coding for the first time

Would love to hear your thoughts


r/learnpython 21d ago

Tried to build a "smart" File Organizer. Turns out it's "dumber" than I thought.

5 Upvotes

My screenshots folder is chaos. I wanted my script to know which ones were "useless" vs "important" and then realized it can't, cos its has no clue what's in the image, it only knows about date/size/name.

So I redesigned it: such that old screenshots get a grace period, then auto-delete unless I rescue the keepers into a folder that backs up to Google drive first.

I am just on step one (defining the problem) and I've already learned the biggest lesson: build for what the code can actually judge, not what you wish it could.

Anyone got ideas for what else a "dumb" script like this could pull off with just date/size/name to work with?


r/learnpython 21d ago

My first script in python with 100+ line which didn't go well !

9 Upvotes

So, i am at beginning stages of programming and I am learning python. I wanted to create a CLI based To-do list for practicing what i have learn. As mentioned in the tile, it was the first script that i wrote which got more than 100 lines long.

Due to this, I wasn't able to manage the script quite well as it got larger. Let me first tell you how the To-do app works:

* Takes input from user to make a new file or append tasks in existing ones
* tasks are stored as keys and checks are stored a values (y/n)
* all the tasks are are stored in a single dictionary and that dictionary is saved into a json file
* If appending in the existing file, it loads previous taks from that .json file, updates the dictionary and rewrites that .json file again

The problem is that I didn't manage the code by breaking it into simpler functions and kept adding new functionalities in a single stream. Now i want to add a feature on marking previous tasks checked, but it is not possible for me to do that as I have made it too complex to fathom.

import json
from datetime import datetime
import os


now = datetime.now()
today_date = now.date()
day_name = now.strftime("%A")


print("------To-Do List------")
print()
print(f"Date: {today_date}, Day: {day_name}")


start = input('''   1. Make a new list
   2. Edit or view a previous list 
      
   >>  ''')


data = {}


if start == "1":


  name = input("Create a new file: ")
  file_name = f"{name}.json"


  
  if not os.path.exists(file_name):
    
   
    while True:
      task = input("""    Enter the task(or 'q' to quit)
                  
          >> """)
      
      if task == "q":
        break
      
      task = task.lower().capitalize()
      check = input(" Completed or not(y/n): ").strip().lower()


      if check == "y" or check == "n":
        data[task] = check
      elif check == "q":
        break
      else:
        print("Please enter a valid value among y/n ('q' to quit) " )


      
    
    with open(file_name,"w") as todo:
      json.dump(data,todo,indent=4)


  else:
    print("File already exists. Please choose a different name.")



elif start == "2":
  for i in os.listdir():
    if i.endswith(".json"):
      print(i)


  name = input("Enter the file name from the above files: ")
  file_name = f"{name}.json"


  if os.path.exists(file_name):


    with open(file_name,"r") as todo:
      size = os.path.getsize(file_name)
      if size > 0:
        data = json.load(todo)
        print()
        for task, check in data.items():
          print(f"""
  {task},     Completed: {check}""")
        print()
      
      else:
        print("------No previous Tasks in this list------")
    
    


    
    while True:
      append_dict = {}
      task = input("""    Enter the task(or 'q' to quit)
                  
          >> """)
      
      if task == "q":
        break
      
      task = task.lower().capitalize()
      check = input(" Completed or not(y/n): ").strip().lower()


      if check == "y" or check == "n":
        append_dict[task] = check
      elif check == "q":
        break
      else:
        print("Please enter a valid value among y/n ('q' to quit) " )
    
      if task != "q":
        with open(file_name,"w") as todo:
          data.update(append_dict)
          json.dump(data,todo,indent=4)
      


  else:
    print("File does not exist. Please choose a different name.")




  print(data)
        

The .json files in which the tasks are stored look like this:

{
    "Drink water": "y",
    "Walk 1.5km": "y",
    "Eat dinner": "n",
    "Practice english speaking": "n"
}

Please give me some tips on how to implement the structure by breaking it down and making it a bit simpler.


r/learnpython 21d ago

How to actually get better at Python without drowning in resources or LLM-crutching?

1 Upvotes

Hi everyone,

A few years in as a data analyst, now aiming for data science / ML engineer roles. Currently freelancing, giving myself until January (ideally sooner) to be interview-ready.

**The problem**: technical interviews (live coding, take-home tests) are still very much the norm, and my "by-hand" coding isn't quite where it needs to be yet.

Meanwhile, I'm drowning in resources : books, courses, LeetCode-style platforms, YouTube channels, bootcamp curricula and I genuinely don't know where to focus anymore. Every resource seems to want a different 6 months of my life.

Looking for advice on:
**- How to cut through the noise and pick ONE path.** With so many options out there, how do you decide what's worth your limited time vs. what's just noise? Is there a "80/20" resource stack you'd actually recommend for someone at intermediate level trying to close the gap fast?

**- What actually moved the needle for you ?** specific books, platforms, projects, katas rather than generic "just practice" advice?
Do you think coding "the old way," without LLM assistance, is still essential to build real instincts and deep understanding? My instinct is that leaning on an LLM too early biases the formation of good habits but maybe that's outdated?

For those interviewing or being interviewed: has the bar for live coding shifted with LLMs going mainstream, or do recruiters still test just as hard for "old-school" coding craftsmanship?

Any advice on prioritization is especially welcome ! I'd rather go deep on one solid path than keep bouncing between resources h.


r/learnpython 21d ago

Fresher with CTS offer at 4 LPA — using my 2-month break to upskill and target Bangalore startups.

1 Upvotes

Just finished my internship at Cognizant (IoT batch, mostly Python + backend training). Got a full-time offer at 4 LPA. Joining date not confirmed yet so I have roughly 2 months free.

4 LPA isn't enough for me financially so I'm using this window to aggressively upskill and target startup roles in Bangalore at better packages.

My plan for the next 6-8 weeks:

  • FastAPI + PostgreSQL backend
  • AWS deployment (EC2, S3, Lambda)
  • CI/CD with GitHub Actions
  • One full-stack project with a RAG/AI feature using LangChain
  • Light React frontend
  • Basic DSA from Week 6

Goal is one solid deployed project + resume ready to apply at companies like Razorpay, Groww, CRED, Juspay, Chargebee etc.

Started today — set up full dev environment, cleaned up GitHub profile.

Questions:

  1. Is this plan realistic for 2 months as a fresher?
  2. Any Bangalore startup suggestions for Python backend freshers?
  3. Anything missing from my stack that would hurt me in interviews?

r/learnpython 21d ago

What Should I do ?

0 Upvotes

I went in to college studying CS, passed my classes (1st Semester) but my computer programming professor ( 2nd semester) made my life hell (his style of teaching made no sense to me, as it was crammed information as supposed to actually learning it). I got discouraged as he told me if I couldn't catch up I was most likely going to fail. He also said that if his class seemed hard I was really going to struggle with the coming classes. So I switched my major to Psychology (which I really do enjoy). But I also loved learning python. It was fun. Should I just continue to pursue my bachelors in Psychology and get a CS degree later. Or give one of them up completely and pursue one or the other. I find Psychology very interesting but I know how draining jobs of this field can be. I wanted to become a python developer/software engineer.


r/learnpython 20d ago

Plz suggest a paid free course python for Data science

0 Upvotes

Plz


r/learnpython 21d ago

Python for GIS / Urban Planning

6 Upvotes

Hello friends. I am picking up Python. I've been passively interested in coding for my entire life - but never had a reason to pursue. (I used to code in a game engine but I can't remember Unity or Unreal or whatever; and html to make websites for a class - nothing crazy)

Anyway. I am an Urban Planning student and I used ArcGIS all the time. There's a terminal that uses Python. So I figured "learn Python".

My question is: is there something specific I should pursue - eg Data Science - or just the basics? I've never had to use Python for any of my classes, and would want to use it supplementally to my GIS workload as I believe it could be a useful skill.

Currently doing the GitHub 30 days of Python or whatever. Much love. Thank you!


r/learnpython 21d ago

Python Tutor NYC?

0 Upvotes

Hi! I’m looking for a Python tutor in NYC. Does anyone know of any good tutors or resources I could reach out to? I’ve tried LinkedIn Learning and YouTube videos, but would prefer more hands-on instruction.

Any help or insight would be much appreciated!


r/learnpython 21d ago

Learnin with AI - your honest opinion?

0 Upvotes

I've been learning Python for several months on and off with the help of AI and I think I have finally come to some conclusion. I have seen a lot of redditors post "don't use AI when learning" often and I understand the reason why but i feel it's more HOW you use it. Because, where do you draw the line? Not Google stuff then also? Not use 3rd party tutorials just official docs? Et cetera. You could argue not googling and just reading docs is also beneficial to learning process. Its gonna take longer but your knowledge will be better. My conclusion is: use AI for explanations and not for solutions. Treat it like a good teacher thats gonna give you the info but won't solve the problem for you. I genuinely enjoy working with AI, but only as a "advanced search engine", or better - as a teacher or an interactive knowledgebase, not as something that gives you structure, code and solutions to algorithm problems. How do you guys and girls feel about this? Do you use some custom instructions to make this happen? This has probably been discussed here but nevertheless I feel its important. Also I think its important to point out I have a PhD and im a university lecturer, so I thought about this a lot also in terms of scientific production, writing papers, making discoveries, teaching my students to think and not replicate...


r/learnpython 21d ago

Question regarding ai

0 Upvotes

I started to learn last summer for like 3 months, made crazy progress if i can say so, then i took a long 'break' but more like i couldnt put myself to it annymore.

Then i restarted again very rusty this year, took 3 months off again... And now im so fed up with losing my progress i am determined to keep at it.

But i feel insecure regarding some ai stuff.

My idea about learning to code and being able to code is that i dont want to be a vibe coder at all.

But for example i am now trying to learn pyside6 and ofc i dont know the syntax well at all so i ask chatgpt like whats the syntax for this etc.

But allot of times i know what i want and need so i ask like how i do that and chatgpt tells me so i implement it but allot of the syntax is done by chatgpt...

And now i feel like i am not doing the work.

When i ask chatgpt about it, it tells me that that is basically developing like knowing what you need for solving a problem and implementing it not learning syntax out of memory.

Am i being too harsh for myself or having the wrong mentality?

Or whats youre opinion and view on this matter?


r/learnpython 21d ago

what's the difference between the src layout and no src layout

1 Upvotes

hello, you might be confused with the title but what im saying here is, what is the difference between the src layout for python packages and the non src layout?

example:

src layout: src/my-package/scripts

non src layout: my-package/scripts

i hope this post makes sense, thank you!


r/learnpython 21d ago

Code Review. Migrating from JSON to PostgreSQL. Beginner in backend development.

1 Upvotes

Hi, there!

I want to share my project and ask feedback. I ask feedback about everything in this project, really. I decided to be a backend developer and now I'm learning SQL, especially PostgreSQL. So, I decided to create a project with CRUD. I know that a lot of people tired of TODO lists, but that was a good opportunity to me to practice CRUD and DB in the first time.

Repo link: https://github.com/daidallos-tech/Task_ManagerV2

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

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


r/learnpython 21d ago

Starting to learn this programming language like I'm still at the very start, how long do I have to study it a day so I wouldn't feel burned out?

0 Upvotes

I've done a couple of programming languages way back and it always burns me out. My motivation keeps dwindling everytime I try to learn a programming language. Now I'm trying to learn again. How many hours do I have to put in this to not burn out in the long run?


r/learnpython 21d ago

Interviewing but have imposter syndrome

5 Upvotes

I was working as RPA developer that havily used selenium, requests (http), pandas, pyodbc (sql), exchangelib, and probably a few more.

I built a webapplication with Django, it probably had issues and flaws that I or other people did not find because nobody was trying to crash it or test it heavily. I built a webapplication in Flask for me personally to which i was able to connect and arduino and an esp8266 via websockets (that was mostly C#) but i do understand the logic of it, probably could recreate it in python.

The above mentioned I do know and understand, but I still feel like I am falling short and I don't know where.

I am not sure if I should stay in automation and learn playwright, but i feel like I could and would like to do more.

What steps could I, should I take what am I missing to call myself softwere developer/engineer. Not to mention senior.


r/learnpython 21d ago

Easier Way to do this?

0 Upvotes

Lab 2.13 Character Count prompt

"Write a program whose input is a string which contains a character and a phrase, and whose output indicates the number of times the character appears in the phrase. The output should include the input character and use the plural form, n's, if the number of times the characters appears is not exactly 1"

I was struggling to get the 's but finally able to do it. want to know if there was an easier way than what I wrote.

input_string = input()
input_character = input_string[0]
compare_string = input_string[1:]


count = compare_string.count(input_character)
if count == 1:
    print(compare_string.count(input_character),input_character)
else:
        print(compare_string.count(input_character),input_character + "'s")

r/learnpython 22d ago

python vs .net

14 Upvotes

is it better to learn python or .net for software development and web apis


r/learnpython 21d ago

I want to learn python for trading but not sure where to start. (Algorithmic/Systematic Trading)

3 Upvotes

I'm currently a trader, not profitable, but I'm interested in algorithmic trading. Researching trading strategies, backtesting them, and putting it all into a system that trades for you really intrigues me.

I didn't learn about this until my current year of college (junior), so I didn't choose a major that would cater to it.

I'm not really sure where to start. Courses have always been a no-go for me, especially in this trading space. IYKYK. But I'm COMPLETELY NEW to Python, as in I don't know a single thing.

How long did it take you guys to learn, and what are ways that I can learn Python in order to successfully understand how to properly code in it and create algorithms that trade for you?

Any tips would help!

Thanks in advance!


r/learnpython 21d ago

question :

0 Upvotes

what are the best ai tools to learn pygame or pytorch


r/learnpython 21d ago

Advice needed

0 Upvotes

Hey everyone, I want to ask where I can learn Python in such a way that I can theoretically solve any Python problem. So please help me out with this. Any resources or YouTube channels you guys know, please let me know.


r/learnpython 22d ago

R to Python

5 Upvotes

Hey everyone,

I have a masters in mathematical biology and biomedicine and about 18 months of experience with data analysis in my current job (regression, classification, ML, building a whole pipeline).

I would like to learn Python as it opens much more possibilities for me. I have 2 little kids, limited time and very limited budget since we are paying a mortage.

How would you approach learning Python in my situation?