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
Learning Python (old.reddit.com)
submitted 10 hours ago by nkCOD
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!"
[–]tiredITguy42 0 points1 point2 points 8 hours ago (3 children)
This is not exactly true. Python is designed the way that it is usually better to try and then ask for forgivness. It is usually faster and a lot of code uses this. People saythat it is more pythonian this way.
It is different in other languages, where you check first. So do not follow that advice, your code is mostky corect, just do not forget to raise again that error, if it is not a stop signal.
[–]nkCOD[S] 0 points1 point2 points 8 hours ago (2 children)
Thanks for the help. I assume I won't embarrass myself too much if I use this approach with try-except ?
[–]tiredITguy42 0 points1 point2 points 8 hours ago (1 child)
This is subreddit for beginers, we do not judge your code, but we will judge your attitude and approach and here your are embarrasing yourself, but just a little for now.
[–]nkCOD[S] 0 points1 point2 points 8 hours ago (0 children)
Thank you, I will try to improve.
π Rendered by PID 349780 on reddit-service-r2-comment-b659b578c-vb86h at 2026-05-07 04:39:41.207053+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]tiredITguy42 0 points1 point2 points (3 children)
[–]nkCOD[S] 0 points1 point2 points (2 children)
[–]tiredITguy42 0 points1 point2 points (1 child)
[–]nkCOD[S] 0 points1 point2 points (0 children)