r/PythonLearning • u/wanna_bee_yours • Sep 05 '26
Help Request Which one should I prefer mit or cs50p or mooc course
I want to go deep into it.
r/PythonLearning • u/wanna_bee_yours • Sep 05 '26
I want to go deep into it.
r/PythonLearning • u/Sea-Ad7805 • Jul 29 '26
An exercise to help build the right mental model for Python data. The “Solution” link uses memory_graph to visualize execution and reveals what’s actually happening:
r/PythonLearning • u/Anay_Gupta__ • Jun 16 '26
r/PythonLearning • u/IntGuru • Apr 13 '26
I am looking for a good platform that I can learn Python on... Any suggestions would be much appreciated!
r/PythonLearning • u/[deleted] • Mar 27 '26
Day 15. Three projects this week. Today: Weather Journal.
What it does:
Logs today's weather (city, temperature, condition) to a CSV
Checks if file exists before writing — adds header only on first run using os.path.isfile()
Filters last 7 days using dt.date.fromisoformat() to convert CSV strings back to date objects for comparison
Calculates weekly average temperature rounded to 2 decimal places
Finds most common weather condition using a frequency dictionary
Trickiest part: comparing dates. CSV always gives you strings. You can't do >= math on strings — had to convert with dt.date.fromisoformat(i[0]) before the comparison worked.
Output for Nagpur today: Mostly Sunny, 36.57°C weekly average.
Three complete projects this week — LifeOS, ExpenseOS, Weather Journal. All built from scratch, all postable. OOP starts Monday.
r/PythonLearning • u/easypeasycode • Sep 20 '25
When you started learning Python, you must have heard or read that Python is a dynamically typed language.
We don't need to specify the data types of our variables, Python figures it out during the runtime.
But have you ever wondered how it really works? Like how Python figures it out that:
x = 10 # This is an integer
x = "This is a string" Let me try to explain as much as I can.
So the first and most important thing is: everything in Python is an object, and an object is nothing but an instance of a class.
Which means everything we use, whether it's integer, float, boolean, or string — every data type has its own class, and when we write:
x = 10this actually means we are creating an object of the integer class which has a label x.
Let's try to understand this by differentiating it with C++.
So in C++:
int x = 10;When we are creating a variable in C++, we use some memory block and provide a name (here x) to that memory block.
So if we say "x is storing 10" this will be a correct statement.
But in Python, when we declare our variable x and we say "x is storing 10," this is not correct at all.
But why? We are doing the same thing?
Because x is just a label to the object of the integer class.
This label can be transferred to any other object of any other class.
That is why in Python:
x = 10
x = "Hello"✅ This will not throw any error.
❌ But if we do the same thing in C++ or Java, this is not allowed and we will get errors in our program.
Let's understand these built-in classes one by one:
x = 10 # Integer
y = "hello" # String
l = [1,2,3] # List10 → instance of built-in class int
"hello" → instance of built-in class str
[1,2,3] → instance of built-in class list
So Python doesn’t use one "universal class" for all — each object is an instance of its specific built-in class, but all of them inherit from the base object class (this is an important statement).
It basically means that the object class is at the top of the hierarchy, and all the other classes are just its child or grandchild — which means they are inherited from it.
Python is mostly implemented in C (the default implementation is called CPython).
Every object in Python is represented by a C structure called PyObject.PyObject has a field called ob_type, which points to the type of the object (like int, str, etc.).
So when you create:
x = 10CPython makes a PyLongObject (the C struct for integers).
It sets its type pointer (ob_type) to &PyLong_Type.
Then it adds a reference in the current namespace (locals() dictionary) with key "x" and value pointing to that object.
So under the hood:
Python keeps a dictionary of variable names → object references.
Objects know their type (class) via ob_type.
I know all of the above is a bit tough to understand, that's why I mentioned it as optional.
Feel free to correct me in the comments, I'm also learning and sharing my learnings here to revise it. Note: I used GPT to convert it into the markdown format and clear some grammar and spelling mistakes, all the explanation part has been done by me.
r/PythonLearning • u/ItsTheWeeBabySeamus • Aug 22 '25
r/PythonLearning • u/Ordinary_Turnip_2355 • Mar 06 '25
r/PythonLearning • u/[deleted] • Jan 20 '25
Hi, I'm sure this question gets asked a lot.
It has been a couple of years since I coded but I want to get back into it as I am heading to university and I know it will come up in some of my maths and economics modules especially Python and R. Plus it is just a useful skill to learn.
I prefer to learn from videos rather than reading. Is there any good youtubers out there that offer step by step tutorials of all basics in python plus intermediate level? Alternatively if there is any particularly good websites then I would be open to using them, I don't need a video, just prefer it.
Many thanks.
r/PythonLearning • u/kerminister • 8d ago
r/PythonLearning • u/clcodingupdates • 18d ago
Did you know you can generate professional PDF reports automatically using just a few lines of Python?
With the ReportLab library, you can create customized PDF documents containing titles, text, tables, charts, and much more.
What you can build:
✅ Automated data analysis reports
✅ Student performance reports
✅ Business and financial summaries
✅ Invoices and certificates
✅ Professional PDF documents
r/PythonLearning • u/Sea-Ad7805 • Sep 07 '26
An exercise to help build the right mental model for Python data.
The “Solution” link uses memory_graph to visualize execution and reveals what’s actually happening.
r/PythonLearning • u/Alarming_Mulberry551 • Jul 28 '26
r/PythonLearning • u/culturemass • Jul 10 '26
Python is gorgeous – logical! It took me but a few hours to figure out what this syntax could be :) Designating a string which has a translation at hand...
But I'd be grateful if someone explained it...
print(_("Something"))
Thanks in advance! :)
edit:
SORRY for the missing parenthesis in the picture :(
so typical of me..
r/PythonLearning • u/aashish_soni5 • Jun 10 '26
Day 4th Python learning
- continue statement
Continue help to escape (skip I mean) anything in iteration you want to skip and then keep going on
-break statement
As name suggest it's use for end the iteration
-while statement
Same as name suggest while it's true , while will continue
Not like for which have end point before starting iteration
.
If I am wrong comment
#python #coding #ai
r/PythonLearning • u/nkCOD • May 08 '26
Good evening. Based on all the comments from the previous post, and taking into account all the suggestions, I have revised the code. I would like to hear from the experts what else can be done to make this code more competent, if necessary, as well as any other issues.
I wrote a program in which the user needs to enter the contents of two lists (numbers), and then these numbers are summed (the first number of the first list with the first number of the second list, and so on). If the list lengths are different, the summation of the smaller list starts with the first element)
r/PythonLearning • u/mesh06 • Oct 10 '25
r/PythonLearning • u/1SaBoy • Oct 07 '25
Mind you I am fresh to programming as a whole... So don't get upset I don't know as much as you do.
Appreciate anyone taking their time to help!
r/PythonLearning • u/Chicken_Nuggies123 • Sep 05 '25
I assume it wants me to use for loops because that's what this unit was about. I have quite a bit of experience with python and programming in general but this just seems insane to me being at the almost very start of an introductory python course. I have genuinely no idea how I would do this so any help is greatly appreciated.
r/PythonLearning • u/Inevitable-Math14 • Mar 03 '25
r/PythonLearning • u/modern-dev • Oct 03 '26
Hey everyone, I decided to make my course free in order to help people.
This course is my backend development course which is about SQL, Python, APIs, Docker, Kubernetes, Linux, Git & More
The link is: https://www.youtube.com/watch?v=CBIu6hcyStg
If you can like and subscribe (and maybe add a comment) I would appreciate it a lot, Thanks.
r/PythonLearning • u/Rscc10 • Jun 13 '26
When I'm away from my desk (or in the bathroom), I code on my phone using online IDEs. Yeah, bite me. Anyways, here's a simple 2048 game and only under 200 lines (unoptimized)
Should be a straightforward yet challenging project for beginners using a lot of list/matrix logic and, in my case, recursion.
r/PythonLearning • u/JustMedansh • Jun 12 '26
Hello!
I'm Medansh, and I'm tryna learn some python since I really like computers. I would call myself somewhere between beginner and intermediate. I've made some projects, but I wouldn't call them more than a toy.
However, it's pretty lonely to learn it alone, and none of my IRL friends have any knowledge of computers. So I'm looking for some friends who might help each other along this journey!
I'd prefer if you are around my skill level (Knows syntax, has done a few projects, nothing too big), though if you're more of a beginner, it's still completely fine.
So, does anyone want to learn with me?
EDIT: I honestly didn’t expect this many responses 😅 I’ve already found a couple of people I’m going to work and learn with, so I’m keeping the group small. Thanks to everyone who reached out. It means a lot.