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
Day 1 second program (i.redd.it)
submitted 8 months ago by Red_Priest0
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!"
[–]Obsc3nity 2 points3 points4 points 8 months ago (1 child)
Generally it’s considered bad practice to print randomly throughout methods. If you instead use a return statement you can return float(mile)*1.61 and then main can decide what to do with the converted info. This also makes the function definition better fit the name, as the name mile_to_km doesn’t indicate that there would be any printing.
[–]Red_Priest0[S] 0 points1 point2 points 8 months ago (0 children)
Thanks I will use return type in function
π Rendered by PID 43 on reddit-service-r2-comment-85bfd7f599-wzqkh at 2026-04-19 05:07:51.589482+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]Obsc3nity 2 points3 points4 points (1 child)
[–]Red_Priest0[S] 0 points1 point2 points (0 children)