US_EU Date, Test_case#3
Why the test case#3 is wrong. Can anybody explain it. If i understood the bug i can fix it, but I'm not be able to find the bug. Please help. You can also run it to try! date = input() if len(date)>10: date1 = date.split(',') date11 = date1[1] date2 = date1[0] date3 = date2.split(' ') date4 = (date2+" " +date11).split(' ') dic ={'January':'1','February':'2','March':'3','April':'4','May':'5','June':'6','July':'7','August':'8','September':'9','October':'10','November':'11','December':'12'} output ="" for m in date4: output+=dic.get(m,m)+' ' n = output.split() def wd(n): return n[1]+'/'+n[0]+'/'+n[2] print(wd(n)) else: day,mo= date[0:2],date[3:5] def us_eu(day,mo,date): return mo +"/"+ day+ date[5:] print(us_eu(day,mo,date))