r/learnpython •

Printing local variables outside of a function

[deleted] — view deleted post

0 Upvotes

14 comments sorted by

View all comments

Show parent comment

3

u/seanv507 Oct 05 '26

Op, you can return a tuple (hours, minutes, seconds) , list [hours,...] or more complex structure.. Iookup python time class

https://docs.python.org/3/library/datetime.html#datetime.time