切片方法,[开始位置:结束位置:步数(可省)]

m = input()
print("year={}\n"
"month={}\n"
"date={}".format(m[0:4],m[4:6],m[6:8]))