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

23rd May 2022, 10:42 AM
Aisy Danish Mohd Nazry
Aisy Danish Mohd Nazry - avatar
1 Answer
+ 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)+".")
23rd May 2022, 11:11 AM
Stefanoo
Stefanoo - avatar