I want to output the string '2019-12-03'
=====
filename="20191203_volum.csv"
yyyy=filename[:4];print(yyyy)
mm=filename[5:6];print(mm)
dd=filename[7:8];print(dd)
yyyymmdd=yyyy+'-'+mm+'-'+dd
print(yyyymmdd)
#I want to output the string '2019-12-03'
# '2019-12-03'
#The result of the program which does not go as expected is the following.
# '2019-2-3'
=====
I took out yyyy, mm, dd respectively. And joined.
However, the result was different from the expectation.
- mm = 12 but 2
- dd = 03 but it became 3.
How should I write a program? I would like you to tell me.