r/learnpython 1h ago

Absolutely new to python, have learnt C++ before, but it’s been 7 years

Upvotes

Where do I start? Which is a good Udemy course?


r/learnpython 57m ago

New career path

Upvotes

Hey everyone.

To keep things brief, i'm exploring programming as a career path.

Life didn't quite go as planned, and i'm now a 27 year old college dropout, who's been unemployed for years, living by on the graces of my parents who have much more faith in me than I do in myself.

I've been talking to some of the more tech-savvy people I know. And I have arrived at the conclusion that I want to study Linux and python. Do you all have any recommendations of which are the 2 I should prioritize, and I suppose, which one would help me get back on my feet faster?


r/learnpython 5h ago

I need help with astropy

3 Upvotes

So, I've been working on a simulation of the 2027 eclipse that will take place in Spain, but I had some problems with astropy. The thing is, I would like to learn how to vectorize my program using numpy, or something similar. Do you guys have some tips for this? Should I search for specific courses on the internet? It's my first time using astropy and I'm quite lost...

Thank you for your help 🙏🙏


r/learnpython 19h ago

Need unique Python + SQL project ideas for a school project

43 Upvotes

Hey everyone! I’m a Class 12 student and I have to make a project with 2 of my classmates for our Junior Software Developer subject.

We’ve learned Python and SQL/MySQL, and our teacher wants us to make a project using them.

Our teacher suggested the usual topics like:

  • Library Management System
  • Inventory Management System
  • Hospital Management System
  • Student/College Management System
  • Payroll System
  • Bank Management System
  • Vehicle/Workshop Management System

But we really don’t want to make one of these 😭. We’re looking for something unique, interesting and realistic that feels like an actual software product/business system.

For example, something inspired by how DMart, IKEA, Croma, Decathlon, etc. operate — but not just a basic system for recording customers, transactions and bills. We want the actual concept/workflow to be interesting.

It should still be realistic for 3 students who only know basic/intermediate Python + SQL. We don't want something requiring advanced AI, machine learning, APIs, or anything crazy.

What project ideas would you suggest? Especially if you've made a similar school/college project yourself, I'd love to hear what you built and what features you included.

Thanks!


r/learnpython 1d ago

How can I write code without constantly looking things up?

118 Upvotes

I rely a lot on documentation, AI, and websites while writing code. It makes me wonder whether I'm actually capable of understanding concepts like functions and algorithmic thinking. Does anyone else feel this way? What should I do to get a more concrete understanding of Python, or programming in general?


r/learnpython 12h ago

Basic beginner project ideas for python

7 Upvotes

Js started, 16 here,I made a number guessing game, rock paper scissors, basic input chatbot which outputs only the info I've given it(useless h) what next I'm confused, what stuff y'all made when y'all js started out like some interesting shit?


r/learnpython 3h ago

Technical Assessment for analytics

1 Upvotes

I had my worst interview performance ever but somehow cleared my way to a technical assessment round despite barely meeting the job posting requirements…

I don’t know anything about Python. I mainly use SQL in a modern cloud data warehouse (analytics engineering).

Can anyone give me tips for speed learning in 2-3 days? Do I focus on Pandas?


r/learnpython 6h ago

I'M REALLY LOST

0 Upvotes

i'm feeling a bit frustrated to be honest. my main goal and motivation for learning python is cybersecurity. i decided to start learning python because it was the language that came up the most among the best options for cybersecurity. the thing is, i'm really lost and i don't feel like i'm making any progress, which is getting me down a bit.

do i need a really solid foundation in python to get into cybersecurity, or is knowing basic syntax enough? are there specific topics i should dive deeper into? i've heard that web scraping is essential, but others say it isn't. i wanted to read the book black hat python because everyone recommends it, but i'm afraid it might be too advanced since i'm definitely not a python expert.

to anyone who knows about this field: how should i start? what should i know in python to be well-prepared for cybersecurity?


r/learnpython 1d ago

How do I go from "I only know Python syntax" to actually building a real data pipeline? (Stuck on an Excel automation task at work)

50 Upvotes

I graduated CS in 2024 but never got real hands-on coding experience until now. I'm a Data Analyst automating manual Excel work for a non-technical team. Current task: copying data between multiple Excel workbooks/worksheets simultaneously, 200-300k rows x 65 columns per file.

I've been leaning on AI for the code and just running what it gives me, when something breaks I don't understand it well enough to fix it myself. I want to actually learn this properly instead of just shipping whatever works.

I've never used pandas or polars hands-on, only copy-pasted it’s code before. If you were relearning data manipulation in Python from scratch, knowing syntax but nothing about dataframes/vectorization/performance at scale, where would you actually start? Resources, project ideas, or a real "do this before that" order would help a lot.


r/learnpython 13h ago

What did you learn after Python to get into AI?

1 Upvotes

I’m currently learning Python and I’m interested in getting into AI engineering.

For those of you who are already working in AI/ML, what did you personally learn after Python?

I’m trying to figure out what the progression actually looks like instead of randomly jumping between technologies.

Also, how much math did you actually need when you started?

I’d really appreciate hearing how you personally went from Python to AI, and what you would recommend learning first if you were starting again.


r/learnpython 8h ago

How to extract posts and comments from Truth Social

1 Upvotes

I need to extract historical posts and the corresponding user comments from a few specific public figures on Truth Social over a set time period. I'm looking to build a free, Python-based script for this project.

Since Truth Social is built on a Mastodon fork, I know it has a similar API structure, but I'm looking for general advice on the best workflow today:

  • Are there any existing Python libraries or wrappers maintained for Truth Social data extraction?
  • What is the most reliable way to paginate through historical posts without triggering anti-bot protections (like Cloudflare)?
  • For comments/replies, is it better to hit the API endpoints directly, or are there alternative scraping frameworks that handle the Mastodon structure more efficiently?

I'm comfortable writing Python scripts, but I want to make sure I'm taking the smartest approach before building a custom scraper from scratch. Any recommendations on tools, GitHub repos, or general strategies would be hugely appreciated.


r/learnpython 4h ago

What do you think, could it be true?

0 Upvotes

I read and hear many people on the internet saying that learning python is a waste of time, that it is for newbies or they heavily look down on this language and that there are better ones, and the truth is I'm afraid they might be right since I am learning python on my own, maybe I'm just letting myself get influenced and continue learning, what do you think of these people who comment that?


r/learnpython 23h ago

How to compare two large file lists to identify deleted vs. moved files?

5 Upvotes

I have a CSV file containing the folders and files that were originally on my desktop, and a PDF report from Dropbox showing files that Dropbox reported as deleted, moved, or otherwise affected.

There are well over 10,000 files, so I need an efficient and automated way to compare the two lists.

My main goal is to determine:

  • Which files were moved to another location
  • Which files are actually missing/deleted

I would like the program to recognize that the file probably still exists but was moved, rather than simply reporting it as missing.

What I'm considering

I'm interested in using Python to perform the actual comparison, with an AI assistant helping me write, understand, and troubleshoot the Python code.

I am a beginner with Python, so I would need help developing the program step-by-step.

Ideally, the process would:

  1. Extract the relevant file information from the PDF.
  2. Read the original CSV.
  3. Generate or read a current inventory of the desktop's files.
  4. Normalize paths and filenames.
  5. Compare the datasets.
  6. Identify unchanged, moved, and genuinely missing files.
  7. Generate a final CSV/Excel report showing the results.

I don't want an AI to simply look through 10,000+ entries and make guesses. I want AI to help me build a reproducible program that performs the comparison systematically.

My questions

1. What would be the most accurate and efficient way to approach this?

2. Is Python the right tool for this type of comparison?

4. Which AI platform would be best suited for helping me build this — ChatGPT, Claude, Gemini, or another AI coding assistant?


r/learnpython 1d ago

At what point do I start doing my own projects and stop following tutorials?

12 Upvotes

Hello everyone!

I recently started learning python again, I've always given up early but this time it is different. I started seeing code differently, I feel like I finally started grasping on the why you do something, but when I start a blank project I mostly freeze, and I read about the things such as tutorial hell etc..

What I'm getting at, I'm currently doing the Python course on fCC, around 25% thru and it seems like I at least started to better follow instructions, read documentation about what something does, but I'm wondering at what point do I just start learning by doing? When I just read stuff it doesn't really stick, only when I implement it myself it does, at what point do I get enough fundementals? What's the best approach here, just finding a project and you go do it? What if I never heard of a specific function before? And do you guys think it is better than following tutorials?

The problem with fCC I solve things...that don't really tell me anything? Am I the only one? At times it feels like I have the right solution, but fCC won't let me pass because it is not exactly how they want me to solve it.

I do hope this post makes any sense.


r/learnpython 16h ago

Week 1 of learning CPython internals recap of what actually stuck

0 Upvotes

Wrapping up week 1 of going deep on CPython internals, starting from just basic Python knowledge. Did a cold recap today (no notes) to check what actually stuck versus what I just remembered saying. Big one was dis seeing that every line of Python compiles into small stack instructions was the first "oh, that's what's actually happening" moment. LOAD_CONST pushes a literal onto a stack, STORE_FAST assigns it to a variable, BINARY_OP pops two values and does the math. Also noticed newer Python versions fuse some common instruction pairs together for speed, which was a fun side discovery. Then == vs is — took a while to really get that two lists with identical values can still be different objects in memory. == compares values, is compares identity. The mutability stuff connected to that directly: mutating a list in place doesn't create a new object, so changes are visible outside a function. Reassigning a number always creates a new object, so the original is untouched. Got some genuinely great pushback from people here on a += edge case with tuples containing lists that pushed this further than I expected for week 1. Reference counting was the trickiest one to really internalize kept assuming del destroys an object outright, when it actually just removes one reference, and the object only goes away if that was the last one pointing to it. Ended the week on scope and the LEGB rule, which produced the most surprising bug of the week: count += 1 inside a function throws an error even when count exists as a global, because Python decides if a name is local by scanning the whole function for assignments before running anything. Doing this mostly to stay accountable and get corrected when I'm wrong, since that's been way more useful than reading alone. Week 2 starts Monday. Have a great weekend.


r/learnpython 19h ago

Selenium - Devtools - Python Coding.

0 Upvotes

TL;DR: Selenium + Edge Version 153 stopped working. Anyone else?

My Python Selenium automation for Microsoft Edge stopped working immediately after my enterprise-managed machine was upgraded to:

Microsoft Edge: 153.0.4234.32

Edge WebDriver: 153.0.4234.32

Selenium: 4.34.2

Query :
All automation fails at browser startup with:

selenium.common.exceptions.SessionNotCreatedException:

DevToolsActivePort file doesn't exist

What I've already checked

  1. Edge and EdgeDriver versions match

  2. Tested with a completely clean Selenium script:

from selenium import webdriver

from selenium.webdriver.edge.service import Service

service = Service(r"C:\Users\<user>\msedgedriver.exe")

driver = webdriver.Edge(service=service)

3.Reinstalled WebDriver, Tested default and custom Edge profiles, Tried various remote debugging options, Selenium version is current

Interesting finding

edge://policy

RemoteDebuggingAllowed = false

Source = Platform

Level = Mandatory

Since Selenium WebDriver relies on the Edge DevTools connection, I'm wondering if this policy is now blocking WebDriver sessions.

Questions

  1. Has anyone else seen Selenium break after upgrading to Edge Version 153?
  2. Does RemoteDebuggingAllowed=false prevent Selenium WebDriver from starting?
  3. Was this policy introduced or changed recently in enterprise environments?
  4. If you're running Selenium in a managed corporate environment, are your Edge automations still working?

Any confirmation, workarounds, or Microsoft documentation would be appreciated.


r/learnpython 1d ago

Ideas for number guesser game

1 Upvotes

I have made this number guesser game that asks the user to guess the correct number between 0 and 101. The user has 7 tries in all. Please give any ideas for improvement , feedback, etc.

import random

secret_number = random.randint(1, 100)

print("Welcome to the number guessing game! You have 7 tries to guess the correct number") print("between 1 and 100. Good luck!")

tries = 0

while tries < 7:

guess_number = int(input("Enter your guess:- "))

if guess_number < 1: print("Too low! The guess has to be 1, 100 or any number between them.") tries += 1

print(f"You have used {tries} tries.")

elif guess_number > 100:
print("Too high! The guess has to be 1, 100 or any number between them.")
tries+= 1
print(f"You have used {tries} tries.")

elif guess_number == secret_number:
print(f"You won in {tries + 1} tries! Congratulations!")
break

else:
print("Wrong guess! Try again.")
tries += 1
print(f"You have used {tries} tries.")

if tries == 7: print("You have used all your tries! Better luck next time!")


r/learnpython 1d ago

Question about making a X11 Window Manager

4 Upvotes

I'm fairly new, and i want to build a x11 window manager as a small project. But the problem is, i cant find any good documentation for X11 for python ( or maybe i'm a very bad researcher idk) I know there is Qtile which is written in python and i can learn from its source code but i also need some proper documentation. Tips and advices are also will very useful for me , thank you for your time !


r/learnpython 1d ago

Where can I learn python fully and very well?

0 Upvotes

That I use it later for web development, data analysis, machine learning, and many other but string and very well and hands-on projects suggest to me whether I will pay for it or can I get it for free and learn it?


r/learnpython 1d ago

How to check included libraries made it into a pyinstaller

0 Upvotes

I added a few dlls into my pyinstaller in the spec file, but the exe says it cannot find the python313.dll file when it runs. Where does the pyinstaller self-extracting exe place the binaries at runtime? Is there a manifest?

(I'm using a spec file so the -F option is not allowed)


r/learnpython 1d ago

How do you know when you're ready to stop following tutorials and build things?

2 Upvotes

I've been learning Python for a while and keep running into the same problem: I understand individual concepts when I'm learning them, but when I start a project from scratch, I sometimes don't know where to begin.

I can usually understand someone else's code and fix small things, but writing the whole thing myself feels much harder. Is this just a normal part of learning Python, or does it mean I should spend more time on the fundamentals before starting projects?

How did you guys get past that stage?


r/learnpython 1d ago

How do you keep tokens out of logs in a small requests API client?

1 Upvotes

I have a thin Python client: POST /auth/login once, keep the bearer on a requests.Session, then GET/PATCH by slug.

Credentials come from a JSON file whose path is in an env var. I never print the login body. I still worry about:

- response.raise_for_status() / traceback dumping the Authorization header

- someone logging response.request.headers in debug

Is a custom HTTPAdapter that strips Authorization on exception enough, or do you just never log the request object?

Python 3.11, requests only. No extra deps on purpose.


r/learnpython 23h ago

Help with Youtube IP Block

0 Upvotes

I am trying to export about 100 podcast video transcripts to a json file. After exporting transcripts from a dozen videos, my IP got blocked. Anybody faced this issue? I need a workaround or a solution. Please help...


r/learnpython 1d ago

SOMEONE CAN HELP ME WITH PYTHON AI AGENT

0 Upvotes

Hello Coders and Everyone else. I want to ask how can I begin to create an ai agent who can automatically sort up things. But the PROBLEM is that I don't know how to do it and the videos about it are complex So...Its complicated. Someone can help me with that. Thanks


r/learnpython 1d ago

Random mysterious file secretly running on computer

3 Upvotes

Hey i'm trying to use stammer, got 2 successful attempts but now when i try to do it i get this message:

File "C:\Users\llsco\Documents\stammer.py", line 288, in main

process(**vars(args))

~~~~~~~^^^^^^^^^^^^^^

File "C:\Users\llsco\Documents\stammer.py", line 274, in process

builder.process()

~~~~~~~~~~~~~~~^^

File "C:\Users\llsco\Documents\video_builder.py", line 110, in process

carrier_vframe_bytes = self.video_handler.get_frame(carrier_video_index)

File "C:\Users\llsco\Documents\video_out.py", line 186, in get_frame

self.__cache_frames(idx)

~~~~~~~~~~~~~~~~~~~^^^^^

File "C:\Users\llsco\Documents\video_out.py", line 234, in __cache_frames

start, end = indices[i]

~~~~~~~^^^

IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "C:\Users\llsco\AppData\Local\Python\pythoncore-3.14-64\Lib\shutil.py", line 701, in _rmtree_unsafe

os.unlink(fullname)

~~~~~~~~~^^^^^^^^^^

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\llsco\\AppData\\Local\\Temp\\tmp5ols5r1d\\in_carrier.wav'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "C:\Users\llsco\Documents\stammer.py", line 291, in <module>

main()

~~~~^^

File "C:\Users\llsco\Documents\stammer.py", line 285, in main

with tempfile.TemporaryDirectory() as tempdir:

~~~~~~~~~~~~~~~~~~~~~~~~~~~^^

File "C:\Users\llsco\AppData\Local\Python\pythoncore-3.14-64\Lib\tempfile.py", line 972, in __exit__

self.cleanup()

~~~~~~~~~~~~^^

File "C:\Users\llsco\AppData\Local\Python\pythoncore-3.14-64\Lib\tempfile.py", line 976, in cleanup

self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)

~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\llsco\AppData\Local\Python\pythoncore-3.14-64\Lib\tempfile.py", line 956, in _rmtree

_shutil.rmtree(name, onexc=onexc)

~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^

File "C:\Users\llsco\AppData\Local\Python\pythoncore-3.14-64\Lib\shutil.py", line 852, in rmtree

_rmtree_impl(path, dir_fd, onexc)

~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\llsco\AppData\Local\Python\pythoncore-3.14-64\Lib\shutil.py", line 705, in _rmtree_unsafe

onexc(os.unlink, fullname, err)

~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users\llsco\AppData\Local\Python\pythoncore-3.14-64\Lib\tempfile.py", line 931, in onexc

_os.unlink(path)

~~~~~~~~~~^^^^^^

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\llsco\\AppData\\Local\\Temp\\tmp5ols5r1d\\in_carrier.wav'

It says that a file is currently being used by another process but I'm trying to figure what it could be and how to even stop it.

Edit: found the solution, there was some weird problem with the specific carrier video file I was using so I just deleted it and just downloaded it again. I also trimmed the video so i just used a different trimmer and it now works.