r/PythonLearning • • May 19 '26

y'all git is my new learning superpower

66 Upvotes

i've been writing code or playing with it for decades. Never bothered to use git except to get projects to install and run for ages. I never coded with anyone else, juset me, myself, and I so it didn't seem too important. The last year or two i started using it. I just now, since i have to learn it because i started a job as an intern. Instantly I knew how important it was. Now after learning an hour in....holy crap. I can see every commit, for every version or branch and why for an entire mature codebase. That's the best teaching tool ever. I can legit step through the entire pypi library. Nothing cooler that I've learned to date.


r/PythonLearning • • Apr 17 '26

Why doesn’t the $ sign appear on my terminal?

Thumbnail
gallery
66 Upvotes

r/PythonLearning • • Apr 07 '26 Bravo

i want to start to learn python but i dont know how

66 Upvotes

i want to learn pythong from scratch but i dont know what the best way.

my goals when learning python is to know how to create neaural networks and machine learning code (basicly a functioning ai) and maybe if it possible to learn how to hack too.

im pretty good at learning things quite fast so i want the learning to be as efficent as possible not like the youtube videos that explain how to write hello world in 30 minutes.

and if there any more suggestion to things i can learn in python it will be great too


r/PythonLearning • • Oct 08 '25

dynamic programming

Post image
66 Upvotes

r/PythonLearning • • Aug 18 '25

made a basic calculator program for python (im a beginner so advice would be appreciated)

Post image
66 Upvotes

struggle with the input but remembered i had to make the inputs for number_1/2 an int


r/PythonLearning • • Aug 16 '25

Playing with data… just scraped a local shop’s site.

Thumbnail
gallery
66 Upvotes

r/PythonLearning • • Sep 23 '25

Interpreter vs Compiler

Post image
65 Upvotes

Python is a Interpreted language.

Purpose of Compiler and Interpreter:

Machines can't understand the language(English) which we understand and we can't understand the language that machines could understand(Bits 0's and 1's).

So , we write instructions in High level languages like Python or Java and these instructions are converted into machine level language by the compiler or interpreter based on the high level language that is used.

Difference between Compiler and Interpreter:

CompilerInterpreter
Executes the whole file at onceExecutes line by line
Faster as the compiler translates the whole file before executionSlower as the interpreter translates line by line during the runtime
Even a single line will not be executed if there is an error in the codeIf there is an error in line 46, till line 45 the code will execute fine and error message would appear

This is my understanding , correct me if I am wrong and you could also state some other differences.


r/PythonLearning • • Sep 13 '25

I built a free platform to help people learn Python. I'd love your honest feedback.

65 Upvotes

Hey everyone! As someone who has spent endless hours on tutorials and in books, I know how frustrating it can be to feel like you haven't written a single line of code. That feeling inspired me to create a personal project: LearnPython.ai

It's an interactive platform, and our philosophy is simple: the best way to learn is by doing. Instead of videos, our platform offers a series of hands-on challenges that get you writing code from the very first minute. The goal is to turn theory into practice, with the help of AI that gives you instant feedback.

The most important thing for me is that the platform is completely free for everyone.

The reason I'm making this post is not for advertising. I'm here to ask for something valuable: your honest feedback. Whether you're a complete beginner looking for guidance or an experienced developer, I would love for you to try the platform and tell me what you think.

What are its strengths? What could I improve? Every comment, positive or negative, is incredibly helpful in making this project even better for the community.


r/PythonLearning • • Jul 02 '25

[help needed] for i in range commands not valid?

Thumbnail
gallery
65 Upvotes

I really don't know what this means, could someone please explain and show me how to fix it?


r/PythonLearning • • Apr 23 '25

My life goal is to learn python

65 Upvotes

I always had fear of coding so I never took it seriously.

However I am on a challenge streak looking for new challenges.

Learning python is my next goal.

My main fear is forgetting things for instance I learn python at work place, so I wasn't able to code/practice for few days.

I was like damn I didn't remember a thing. At same time I completed the chapter about Scope Function im the "learning python" book without a sweat!

What's next and how can I work on projects?


r/PythonLearning • • Oct 27 '25

Discussion the first time i looked at old code and thought ‘what idiot wrote this?’ it was me.

64 Upvotes

found one of my first python scripts today. no comments, random variables, pure chaos. i actually laughed out loud like bro, what was i doing.

funny part? i remember how proud i was when it ran. i opened it in cosine just for nostalgia and realized… it still kind of works. badly. but works.

you ever look back at your early code and cringe and smile at the same time?


r/PythonLearning • • Oct 19 '25

basic calculator

Post image
64 Upvotes

r/PythonLearning • • Aug 03 '25

Showcase Day 1 of developing my text RPG

Thumbnail
gallery
64 Upvotes

Today I started working on my text based backpacking RPG. I started with designing a scroll option title screen, players press 'w' or 's' to scroll through the options then enter to pick their option. I always see people doing typing, and I wanted to see if I could do something smoother while still using python. Tell me what you guys think!


r/PythonLearning • • Jun 15 '25

Discussion Is there a way to write code like this more efficient?

Post image
64 Upvotes

Hello. I am trying to write code where the user inputs a string (a sentence), then based on what words are in the user-input sentence, the program will do different things. I know that I can write it using if statements, but that is very slow. I also know that I can write it in a different language that is faster, like C++ or C#, but I am not very good with those languages. So... what is the most optimal way of writing this in Python?


r/PythonLearning • • Apr 27 '26

Showcase the task thing’s easy 😅

Post image
63 Upvotes

i wrote it but the save/load part is ai, rest is all me. what y'all think?


r/PythonLearning • • Apr 10 '26

Building for beginners

63 Upvotes

I have been learning Python but reached that moment of like. “What should I do next?” Started asking my self ( “Am I learning the right way” is it good ) etc. the I started building projects every now and then. It gave me that strength to regain my learnt skills but I go so busy and the repo been dormant for a while, massive projects listed some finished but others isn’t. Those interested can contribute to it.

Practicing your Python skills and contributing to open source.

print(“Good luck”)

Link: https://github.com/tomi3-11/Python-beginner-CLI-projects


r/PythonLearning • • Oct 05 '25

Help Request Don’t know why code isnt working

Post image
63 Upvotes

For school, I have been assigned a task to create a code that iterates through the 1d array and removes any integers below 0 and the string ‘placeholder’. However, I can’t seem to get it to work. Any help would be much appreciated.


r/PythonLearning • • Jan 19 '25

My first code.

Post image
63 Upvotes

r/PythonLearning • • 14d ago

Python still worth learning in big 2026?

62 Upvotes

So basically i am 16 first time trying to learn a language should i learn python or not?


r/PythonLearning • • Sep 05 '26

Showcase I've been learning Python for 3 years, and I thought it was time to make a library

Post image
62 Upvotes

I've been learning Python for about 3 years, and I think it was time to take a step further and make my own library.

I made scanlayer, a Python OCR library built around Tesseract. It turns scanned images into searchable PDFs while preserving the original image, by adding an invisible OCR text layer over it.

It also supports things like preprocessing, deskewing, multiple OCR output formats, multi-page PDFs, batch processing, and a CLI.

The main goal wasn't to make some huge library. I wanted to challenge myself with building something that feels like a proper Python project and learn more about packaging, testing, API design, OCR, and PDF generation along the way.

GitHub Page

I'd really appreciate any feedback, especially on the Python/library design side.


r/PythonLearning • • Jun 06 '26

First time programming

Thumbnail
gallery
62 Upvotes

This is the calculation engine, each and every line is typed by me no AI was used. It was fairly easy to understand the concept of function, arguments, data types etc. thought it was a good idea to manually code this, instead of relaying upon AI coz I would absolutely have no idea how to debug if AI messed up something in the actual calculation.

The output results are in agreement with the mainstream software.


r/PythonLearning • • Aug 13 '26

Normal distribution and uniform distribution

Thumbnail
gallery
61 Upvotes

r/PythonLearning • • Jul 15 '26

Discussion Building a Python library based on Hegelian logic instead of Boolean logic. Am I crazy?

61 Upvotes

I've been thinking about what might be the most unconventional Python project I've ever attempted, and I'd love to hear from people who know logic, PL theory, mathematics, AI, philosophy, or simply enjoy strange ideas.

The core idea is this: instead of representing truth as a binary (True/False), what if computation were built around dialectical processes?

Rather than asking whether a proposition is true or false, objects could evolve through concepts like: Thesis, Antithesis, Synthesis, Contradiction, Determinate negation, Becoming, Mediation...

In other words, contradictions wouldn't necessarily be errors — they could become first-class computational objects capable of producing new states.

I'm currently collecting papers, books, theses, existing projects, and mathematical frameworks before deciding on the architecture. Any ideas?


r/PythonLearning • • 23d ago

🐍 𝗣𝘆𝘁𝗵𝗼𝗻 𝗰𝗮𝗻 𝗻𝗼𝘄 𝗶𝗺𝗽𝗼𝗿𝘁 𝗮 𝗺𝗼𝗱𝘂𝗹𝗲 𝘄𝗶𝘁𝗵𝗼𝘂𝘁 𝗮𝗰𝘁𝘂𝗮𝗹𝗹𝘆 𝗹𝗼𝗮𝗱𝗶𝗻𝗴 𝗶𝘁 𝗶𝗺𝗺𝗲𝗱𝗶𝗮𝘁𝗲𝗹𝘆.

Post image
60 Upvotes

With explicit lazy imports, an imported module can be deferred until the program actually needs it.

Why does that matter?
Many Python applications import dozens — sometimes hundreds — of modules during startup, even though only a fraction may be needed for a particular execution path.

Lazy imports can change that:
𝗜𝗺𝗽𝗼𝗿𝘁 𝗱𝗲𝗰𝗹𝗮𝗿𝗲𝗱 → 𝗮𝗽𝗽𝗹𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝗰𝗼𝗻𝘁𝗶𝗻𝘂𝗲𝘀 → 𝗺𝗼𝗱𝘂𝗹𝗲 𝗹𝗼𝗮𝗱𝗲𝗱 𝗼𝗻 𝗳𝗶𝗿𝘀𝘁 𝘂𝘀𝗲

This can be particularly interesting for CLI tools, large applications, optional functionality and dependency-heavy projects where startup time matters.
Of course, lazy loading isn't automatically better everywhere. Import-time side effects and assumptions about module initialization still matter.
But having lazy imports as an explicit language feature opens up some interesting possibilities for Python application architecture.

𝗟𝗼𝗮𝗱 𝘄𝗵𝗮𝘁 𝘆𝗼𝘂 𝗻𝗲𝗲𝗱. 𝗪𝗵𝗲𝗻 𝘆𝗼𝘂 𝗻𝗲𝗲𝗱 𝗶𝘁.

𝗪𝗼𝘂𝗹𝗱 𝘆𝗼𝘂 𝘂𝘀𝗲 𝗹𝗮𝘇𝘆 𝗶𝗺𝗽𝗼𝗿𝘁𝘀 𝗶𝗻 𝗽𝗿𝗼𝗱𝘂𝗰𝘁𝗶𝗼𝗻?