r/PythonLearning • • Aug 20 '25

Day 1 second program

Post image
77 Upvotes

20 comments sorted by

View all comments

1

u/Loud-Bake-2740 Aug 20 '25

as others have mentioned, use return rather than print. BUT if you are going to print, you should use an f-string (formatted string). this allows you to more cleanly put variables into a print statement. see the following

print(f”There are {kilometer_value} kilometers in {miles_value} miles”) 

this is the general standard for how to print things, and will make it much easier to do on the fly later on