0
How can if print the output for date 2021-03-31 when the input for date is year = 2021 Month = 3 and day 31
But if i put next input for date is 2021,02,3 the output is 2021-02-03 https://code.sololearn.com/c4XzuhMhMPKE/?ref=app
1 Respuesta
+ 1
If you want a previous 0 you can use zfill like this.
print("This is flight schedule for",y+"-"+m.zfill(2)+"-"+d.zfill(2)+".")