n="2019,10,17" y=n.split(',') #按,分割成数组 y=y[::-1] #反转数组 print('The data is ',','.join(y)) #拼接输出
按照逗号分割然后反过来输出就好