I have a program that outputs flight time but sometimes it's less than an hour and in that case I don't want a 0 hour displayed.
I could use an if
statement for one that has hours and one that doesn't but that doesn't seem efficient. Also would be nice if minutes is zero don't display minutes either.
landed_time_msg = time.strftime("Apx. flt. time %-H Hours : %-M Mins. ",time.gmtime(self.landed_time))