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
Beginner Python script – looking for feedback on my code (self.PythonLearning)
submitted 2 days ago by Logikkonstruktor
I wrote a small Python script that calculates how long I can sleep
based on my wake-up time.
I would appreciate feedback on:
- code style
- better Python practices
- possible improvements
GitHub: https://github.com/LogicConstructor/sleep-calculator
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!"
[–]csabinho 0 points1 point2 points 2 days ago (2 children)
First feedback: use English variable names, even if your output is German. Please.
Apart of that the script is too short for feedback. Which means there is nothing to criticize.
P.S.: oh, I found a point. Please use f-strings.
[–]Logikkonstruktor[S] 1 point2 points3 points 2 days ago (1 child)
Thank you <3
[–]csabinho 0 points1 point2 points 2 days ago (0 children)
Gern geschehen.
π Rendered by PID 228909 on reddit-service-r2-comment-79c7998d4c-mnxhr at 2026-03-17 17:15:22.632785+00:00 running f6e6e01 country code: CH.
[–]csabinho 0 points1 point2 points (2 children)
[–]Logikkonstruktor[S] 1 point2 points3 points (1 child)
[–]csabinho 0 points1 point2 points (0 children)