in general thenif you're converting something that supposed to be an intit' safest to use int rather than eval returning to the date conversion algorithmwe can turn monthstr into number using int and then use this value to look up the correct month name here is the codemonths ["january""february""march""april""may""june""july""august""september""october""november""december"monthstr months[int(monthstr)- remember the indexing expression int(monthstr)- is used because list indexes start at the last step in our program is to piece together the date in the new format print("the converted date is:"monthstrdaystr+","yearstrnotice how have used concatenation for the comma immediately after the day here' the complete programdateconvert py converts date in form "mm/dd/yyyyto "month dayyeardef main()get the date datestr input("enter date (mm/dd/yyyy)"split into components monthstrdaystryearstr datestr split("/"convert monthstr to the month name months ["january""february""march""april""may""june""july""august""september""october""november""december"monthstr months[int(monthstr)- output result in month dayyear format print("the converted date is:"monthstrdaystr+","yearstrmain(when runthe output looks like thisenter date (mm/dd/yyyy)the converted date ismay this simple example didn' show itbut often it is also necessary to turn number into string in pythonmost data types can be converted into strings using the str function here are couple of simple examples