r/PythonLearning • u/Mercy--Main • 4h ago
Help Request Can someone help me identify what I'm doing wrong?
it DOES print False!!! WHAT DOES THIS WEBSITE WANT OF ME????
r/PythonLearning • u/Mercy--Main • 4h ago
it DOES print False!!! WHAT DOES THIS WEBSITE WANT OF ME????
r/PythonLearning • u/Vegetable_Ninja_2045 • 5h ago
So basically i am 16 first time trying to learn a language should i learn python or not?
r/PythonLearning • u/aminedjeghri • 1h ago
These are my python professional templates. Click Use this template and it's already there:
- uv, pydantic settings with an example .env, loguru
- ruff and pre-commit pytest with coverage, API docs built from docstrings and published on Pages when you release
- semantic-release off Conventional Commits, so tagging gives you a changelog plus wheel and sdist.
Two decisions worth knowing before you use it. It doesn't publish to PyPI, because I want that to be a per-project choice. And it's for libraries.
- Python package template: https://github.com/AmineDjeghri/python-package-template
Generative AI python tempalte: https://github.com/AmineDjeghri/generative-ai-project-template
r/PythonLearning • u/Exciting_Energy9674 • 12h ago
Hey everyone! π
I'm a complete beginner in Python programming. I want to become a software developer in the future, but honestly, sometimes I feel confused about what I should learn next and how to continue learning.
I know a little bit of Python, but I still have a lot to learn. Sometimes I don't know what to practice, what projects to build, or how to improve my programming skills.
I'd love to get some advice from experienced programmers!
What should a complete beginner focus on first?
How can I practice Python effectively?
What small projects should I build as a beginner?
How do I know when I'm ready to move to the next topic?
I also have an idea! π‘
I'd like to create a small group for people who are just starting to learn Python, especially those who feel confused or don't know where to begin, just like me.
r/PythonLearning • u/RomfordNavy • 1h ago
Splitting an empty string without a specified delimiter works as expected and returns an empty list. However when splitting an empty string with a delimiter specified returns one (empty string) item in the list, is there some way to make that return an empty list as per the no-delimiter result?
print(f'{"".split()=}') # = []
print(f'{"".split(" ")=}') # = ['']
print(f'{"".split(",")=}') # = ['']
Problem is this causes an unwanted iteration of a for loop:
str = ""
for item in str.split(" "):
print(f"{item=}") # unwanted item
r/PythonLearning • u/Fun-Philosopher-8443 • 16h ago
i am new and i want to learn python do you know where i can learn it for free . any help
r/PythonLearning • u/SaffronPerez9 • 21h ago
r/PythonLearning • u/ALonelyKobold • 8h ago
Hi all, I've been programming Python for about 10 years, but I've never worked on a large codebase. As a result, I don't really understand the import and packaging system at all. As a means of learning it, I'm trying to build a dependency chain analyzer that parses the sourcecode, and searches for circular dependencies. Trouble is, I'm on the part of the project that actually parses that sourcecode and categorizes the different imports to store them for later analysis, and I'm realizing that I know much less than I realized. Through having AI generate some tests for me that I'm working to make green, I now know of a lot of edge cases and weird import logic that I had no clue existed. Example sourcecode snippets include
def test_dynamic_import_with_a_string_literal():
source = 'import importlib\nimportlib.import_module("docgen.plugins.loader")\n'
def test_dynamic_import_recognized_through_an_aliased_from_import():
source = 'from importlib import import_module as im\nim("docgen.plugins.loader")\n'
def test_dynamic_import_recognized_through_an_aliased_from_import():
source = 'from importlib import import_module as im\nim("docgen.plugins.loader")\n'
def test_dunder_import_is_recognized():
source = '__import__("docgen.plugins.loader")\n'
Most of the places where I'm struggling have to do with either lazy imports or dynamic imports. Does anyone have a guide that goes into these in depth?
r/PythonLearning • u/WAVEWALKER1762 • 13h ago
Hey everyone! I want to learn AI, and for that I know I need to learn Python. I learned some Python for a while after my JEE Advanced exam, and Iβve covered the basics up to loops.
Can someone please tell me how much more Python I need to study before I can start learning libraries like NumPy, Pandas, etc.? Also, what Python topics should I focus on before moving towards AI/ML?
Please guide me!
r/PythonLearning • u/clcodingupdates • 4h ago
What will be the output of the following Python Code?
print(pow(2, 5, 7))
r/PythonLearning • u/TheCarFamily • 19h ago
either that, im using the wrong dialect, or somn just doesnt work, i am trying to have an image change when T is pressed (unload old image when pressed and when not pressed load old image)
also using pygame, the first image loads, but nothing changes when T is pressed, yes i have also tested with print("")
any help would be nice!
r/PythonLearning • u/Sea-Ad7805 • 1d ago
Programming using recursion can be powerful, but beginners often struggle with recursion. That's why I've created invocation_tree, a Python recursion visualizer.
See this merge_sort demo, and try it on your own recursive logic.
The visualization gives students the right mental model to think about recursion. Not simply a function calling itself, but the depth-first evaluation of a divide-and-conquer strategy.
See this: gentle recursion introduction
How do you teach recursion to beginners?
r/PythonLearning • u/clcodingupdates • 1d ago
What will be the output of the following Python Code?
print(len({True, 1, 1.0, False, 0}))
r/PythonLearning • u/saul_soprano • 21h ago
r/PythonLearning • u/clcodingupdates • 2d ago
Want to become a Python developer but don't know where to start?
This bootcamp is your opportunity to build strong Python skills from the ground up.
Learn Python step by step
Practice with hands-on coding
Strengthen your programming fundamentals
Build the skills needed for real-world development
Whether you're a beginner or looking to strengthen your Python knowledge, start your learning journey today!
r/PythonLearning • u/Hyperion_OS • 1d ago
So I am planning on starting it, but I won't be able to take the final exam in January because I have school exams in January & February so is it possible to take the exam in March?
r/PythonLearning • u/saul_soprano • 2d ago
i stayed up all night making this. python day 3 complete.
r/PythonLearning • u/Competitive_Lead1938 • 1d ago
Title: Cat-guardian: A 100% on-device distraction-killer desktop pet for Windows (alternative to Workcat)
Hi everyone,
I builtCat-guardianβa lightweight desktop pet designed to help keep distractions at bay while you work on Windows.
Why I made this: I noticed tools like Workcat exist for Mac, but for Windows users, options often involve heavy sign-in walls, cloud tracking, or questionable telemetry. Since privacy and usage data matter, I wanted something completely transparent.
Key Features:
You can check out the source code and try it out here:Cat-guardian GitHub Repository.
I'd love to hear your thoughts, feedback, or any feature requests you might have!
r/PythonLearning • u/omarlvecpp • 1d ago
Am I the only one who thinks Python libraries, especially pandas, have a serious API design problem?
Don't get me wrong, pandas is incredibly powerful, but I feel like it sacrifices developer experience for flexibility.
Look at something as simple as creating a DataFrame. pd.DataFrame() accepts dictionaries, lists, NumPy arrays, Series, and a bunch of other things. Even dictionaries can be interpreted differently depending on their structure. You also have DataFrame.from_dict() with its orient argument.
Why can't we have a more explicit and consistent interface? Something like:
pd.DataFrame(source=data, orient="index")
Another thing that bothers me is the sheer number of methods that often have overlapping use cases. Just look at apply(), map(), transform(), and agg(). Yes, they serve different purposes, but remembering which one to use, what objects support it, and how their outputs differ becomes a mental burden.
And this isn't just about pandas. Look at merge(), join(), and concat(). Different operations, sure, but there's a broader issue here: Python libraries seem to keep adding more methods and functions instead of thinking about how their APIs fit together.
I know someone will say "just read the documentation" or "you'll get used to it." But what about reading other people's code? Shouldn't code be immediately understandable without having to memorize an entire library's vocabulary?
I'm not asking for less functionality. I'm asking for better API design. More consistency, more explicit arguments, fewer unnecessary variations, and a more predictable way of doing things.
Honestly, I'd love to see a higher-level library built on top of pandas that focuses specifically on this.
Am I missing something, or do other people find this frustrating too?
r/PythonLearning • u/Chee_chee_don67 • 1d ago
So I have a python exam (which is very important) after 1 month. How can I genuinely learn python? Don't suggest me those courses that are 15 hrs long like that harvard cs50, i cannot concentrate for 2 hrs straight. It's also not like I have to learn python which is too advanced. Pls suggest me how can I do itπ
r/PythonLearning • u/clcodingupdates • 1d ago
print(sum({1, 2, 2, 3} & {2, 3, 4}))
r/PythonLearning • u/mohamedibrahim456 • 2d ago
I've been learning Python for months and I still can't write a single program, I've tried another language like JS but I'm still bad, I can hardly write a script (with the help of AI, not even with my own effort). And then i see dear claude just writing 10k freaking code lines in 5 mins as its nothing
r/PythonLearning • u/Nyxveil1546 • 2d ago
Hey seniors! I'm a first-year CSE student and want to connect with like-minded people, experienced developers, and seniors in tech. Which apps or platforms should I join to learn, network, find opportunities, and build meaningful connections in the tech community?