立即學習:https://edu.csdn.net/course/play/6861/334689?utm_source=blogtoedu
#使用input 輸入一個身份證號碼,並提取出生年月
#18 112345199801029999
#15 112345980102
value = input("請輸入身份證號:")
if len(value)==18 :
birth = value[6:14]
print(birth)
elif len(value)==15:
birth = '19'+value[6:12]
print(birth)
else:
print("wrong format!")