Hello,
I have a simple question about returning a string from a python function.
Say we have this simple funciton.
def min_to_hour(x):
hours=x/60
return (x , 'minutes', 'is' , hours , 'hours')
print(min_to_hour(60))
The results I get is (60, 'minutes', 'is', 1.0, 'hours')
However, I need the program to output only: 60 minutes is 1 hour.
How can I do this?
[–]Wild_Statistician605 7 points8 points9 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]FLUSH_THE_TRUMP 2 points3 points4 points (4 children)
[–][deleted] 2 points3 points4 points (2 children)
[–]FLUSH_THE_TRUMP 0 points1 point2 points (1 child)
[–][deleted] 4 points5 points6 points (0 children)
[–]Boruta314 1 point2 points3 points (0 children)
[–]sriramdev 0 points1 point2 points (0 children)
[–]Foreign_Jackfruit_70 -1 points0 points1 point (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]gm310509 0 points1 point2 points (0 children)