[Solved] Syntax error in python 3 when I’m trying to convert a date but no luck on trying to solve it [duplicate]
Python 3 Code: def main(): dateStr = input(“Enter a date (mm/dd/yyyy): “) monthStr, dayStr, yearStr = dateStr.split(“https://stackoverflow.com/”) months = [“January”, “February”, “March”, “April”, “May”, “June”, “July”, “August”, “September”, “October”, “November”, “December”] monthStr = months[int(monthStr)-1] print (‘Converted Date: ‘ + ‘ ‘.join([str(dayStr), monthStr, str(yearStr)])) main() Python 2 Code: Use raw_input: def main(): dateStr = raw_input(“Enter a … Read more