Summarize in a line

Viewed 31

I want to add a leading zero if numbers (days) are less than 10. Here is my tried to do it. Is there any possible way to summarize this code in a single line? I have to write my script in a limited number of lines.

      e_day=int(row["DY"])
      e_dy='{:02}'.format(e_day)
0 Answers
Related