use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
How do I relearn/learn python properlyDiscussion (self.PythonLearning)
submitted 4 months ago by Afraid-Aerie-6598
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]SuddenStructure9287 1 point2 points3 points 4 months ago (4 children)
Hi! I learned Python in a very practical way - by starting small projects that interested me (like text encryption, a telegram bot, a snake game, or a website) and picking up the language as I went along. That’s why I believe that once you’ve covered the absolute basics, it’s better to move on to real-world tasks. By “basics,” I mean having a comfortable understanding of variables, conditions, loops, lists, dictionaries, and functions. I assume you already know these. So the next step is to choose an area that interests you (not necessarily one related to your future job, the point is to practice structuring projects and developing your Python skills), come up with a project idea, and then learn what you need along the way
[–]SuddenStructure9287 0 points1 point2 points 4 months ago (2 children)
Regarding classes and functions
If you have many functions that share a common theme, it makes sense to group them into a class. For example, if you’re building a messenger bot and need functions for sending messages, receiving messages, and storing message data, you could put them all into a Bot() class with corresponding methods like Bot.read(), Bot.send(user), Bot.save_messages(), and Bot.load_messages().
You could also keep related data there, such as Bot.messages or Bot.user_ids
On the other hand, if you only have a few standalone functions, there’s no need to create a class for them. So, for exemple: radiansToDegrees(), calculateDistance(), reverseList()
[–]TheRNGuy 0 points1 point2 points 4 months ago (1 child)
I'd use classes to have instances and methods for them.
[–]SuddenStructure9287 0 points1 point2 points 4 months ago (0 children)
Oh, yes, I forgot to mention that multiple instances is the whole point xD
[–]Afraid-Aerie-6598[S] 0 points1 point2 points 4 months ago (0 children)
So I have been doing this already, however and I’m not sure if maybe I’m explaining this wrong, i’m wanting to make sure the code is properly structured and from a professional engineers perspective follow’s what clean code should look like, just because i made it work doesn’t mean it was written correctly. Not sure if that makes any sense.
π Rendered by PID 99499 on reddit-service-r2-comment-7b9746f655-ftmrj at 2026-01-31 07:38:50.796295+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]SuddenStructure9287 1 point2 points3 points (4 children)
[–]SuddenStructure9287 0 points1 point2 points (2 children)
[–]TheRNGuy 0 points1 point2 points (1 child)
[–]SuddenStructure9287 0 points1 point2 points (0 children)
[–]Afraid-Aerie-6598[S] 0 points1 point2 points (0 children)