r/PythonLearning • u/RebornCube • Aug 16 '25
Recursion is the only way
This made ne laugh. Why do something without recursion when you can do it with recursion! Actually quite an interesting way to add, or multiply.
r/PythonLearning • u/RebornCube • Aug 16 '25
This made ne laugh. Why do something without recursion when you can do it with recursion! Actually quite an interesting way to add, or multiply.
r/PythonLearning • u/Informal-Project-595 • May 20 '25
are there any good? im going to move onto learning more about strings now.
r/PythonLearning • u/deryldowney • Feb 07 '25
Hello everyone, my name is Deryl, I am a 54 year-old disabled veteran, stay at home dad. I got into python, machine learning and artificial intelligence because while my body is broken, my mind still works. I wanted something that would challenge me and keep my mind fresh and useful. I wanted to study something that I felt would impact my children’s lives by the time they were old enough to use it. I wanted to study in such a way as that I might be able to have an impact upon it. I’m self taught in everything from programming to machine learning to AI tool sets, including prompting. While I do have an associates degree in computer science, just about everything I know has been self-taught. From my days running a Renegade BBS with its fossil driver, to when the Linux kernel was 0.99, to my Debian GNU/Linux package maintainer days, to helping create the LPIC-2 Linux certification program, to my current studying of Python, ML and AI, computing has been a huge part of my life. It’s a journey that I hope to continue with all of you. Have an awesome day and I’ll see you around the proverbial block! Feel free to wave, say hi, and have a digital coffee with me!
r/PythonLearning • u/Academic_Bench_6392 • Dec 29 '24
r/PythonLearning • u/New_Pay3669 • 10d ago
Out of hundreds of programming languages, why start with Python? You could almost read its code out loud.
Printing one word in C takes several lines of setup. In Python it's one line. Less noise means your brain goes to the problem. Python also ships with a huge toolbox, there's a free add-on for almost everything else, it's free itself, it runs on Windows, macOS and Linux, and so many people use it that most errors you hit already have answers online.
Youtube: AmirZareDev
#python #learnpython #programming #coding
r/PythonLearning • u/karakasoglu • 21d ago
Five short snippets. Guess what each prints before you open the answer. Most people get two or three.
1.
a = [1, 2, 3]
b = a
b.append(4)
print(a)Answer: [1, 2, 3, 4]. b = a doesn't copy the list, both names point at the same list. Want a copy? b = a.copy() or b = a[:].
2.
nums = [10, 3, 27, 8]
sorted(nums)
print(nums)Answer: [10, 3, 27, 8], unchanged. sorted() returns a new list and the result was thrown away. Use nums.sort() to sort in place, or nums = sorted(nums).
3.
def double(x):
x * 2
print(double(3))Answer: None. The function works out x * 2 but never returns it, and a function without return gives back None. Fix: return x * 2.
4.
x = 5
def change():
x = 12
change()
print(x)Answer: 5. Assigning to x inside the function makes a new local x; the outer one is untouched. The clean fix is to return the value (x = change()), not global.
5.
print(round(2.5), round(3.5))Answer: 2 4. Python rounds exact halves to the nearest even number ("banker's rounding"), so 2.5 goes down and 3.5 goes up. If you need school-style rounding, use the decimal module with ROUND_HALF_UP.
I made a small free game out of traps like these: you read a snippet, pick what it prints, and one wrong answer ends the run. Questions get harder and faster as you go, and when you miss, it shows why and the moment in a YouTube tutorial that explains it. No sign-up, plays in the browser:
https://openinbeyond.com/code?utm_source=reddit&utm_content=pythonlearning
What's your score? And which of the five got you?
r/PythonLearning • u/Charming-Ad-4323 • Aug 19 '26
I get the tasks from ChatGPT basically, and I write other manual math related code not sure if this is good to spend too much time on instead of doing mini projects.
To explain more I hit a little bump doing linked list, mostly in OOP I didn’t know much about how classes work. So I pivoted to algorithms and to learn more about classes before going back.
r/PythonLearning
•
u/bogdanelcs
•
Aug 03 '26
r/PythonLearning • u/Due_Professional2071 • Jun 07 '26
I'm currently learning Python and asked ChatGPT to give me an exercise to practice what I've learned so far from the course I'm taking. If you have any tips on how to learn more effectively or any general advice, I'd really appreciate it.
(If you notice some words in Spanish and others in English, it's because I asked ChatGPT to change parts of the code to English so it would be easier for everyone to understand.)
r/PythonLearning
•
u/sittyn
•
May 25 '26
I know some basics of pygame enough to make a simple ping pong or dinosaur game.
But as I say the community of pygame people are making sum very cool projects like actual 3D games. So my instances tell me to learn it coz it seems cool and after all no one does programming for money but for cool random projects.
So should I learn it and if its so how should I?
r/PythonLearning • u/Letscode11 • Sep 07 '25
Reddit got banned in my country not only reddit but most of the social media so i don’t think i can post my codes here anyway thank you most of you guys for supporting and when i return when it gets unbanned i will be better. Good bye for a while!
r/PythonLearning • u/Fit_Lingonberry_4965 • Jul 25 '25
I have just started Python this week, everything is going good and fine. Yesterday I came across a Youtube video, which said that Python coding should be done in a Group(small or medium) as it will make it easier and interesting with friends. So, I'm searching for similar people to join me in my discord server, currently I'm all alone.
My Discord Username: polo069884
Would be happy if anyone likes to join, thank you for reading.
r/PythonLearning • u/[deleted] • Mar 29 '25
I come from a poor family in Brazil and with a lot of effort I have managed to achieve the peace of mind of living a good life.
In 2018 I started learning programming logic and then Python. Simply consumed and filed everything I found along the way in my notebook.
Also learned other things in web development but the biggest jobs and the ones I currently work on are in Python and they support me.
Got the apartment, car and other things of my dreams and even without a degree in the area, I was promoted at the company where I work.
From client manager (I stay between projects making sure all the steps are completed correctly) to the company's new BI department.
And it was all Python that gave me everything.
r/PythonLearning • u/OhFuckThatWasDumb • Dec 05 '24
r/PythonLearning • u/Mountain_Bee_2252 • Aug 02 '26
Hi everyone
For a very super beginner one, who is starting to learn python which one is the best, i'm really confused because i'm seeing some teachers use Vscode and others use pycharm
And if i follow a teacher that uses pycharm it's normal to i use Vscode and visa versa?
Sorry for my bad English and thanks everyone
r/PythonLearning • u/GiraffeLarge9085 • May 10 '26
Hello. I have been practising Python programming for two to three years already. If we exclude the period when all my code was written using endless if-else statements, it would be more accurate to say I spent about a year and a half exploring this sandbox.
Within this period, I developed a library/wrapper for the Faceit API myself. Honestly, I was very dissatisfied with all the counterparts. They were just extremely inconvenient to use. And I had to develop a bot that would mock my friends and send them their awful stats in the matches xd
What am I doing this for? Firstly, as an insecure 18-year-old, I have to ask myself whether I am going in the right direction and what the current level of my progress is. Like, can I possibly find employment after such portfolio? Besides, I'd be lying if I said I didn't want to gain some recognition for my work and get some attention. Someone could actually use it here.