-2

How can I take a string that returns it in a list with " / " between them, like dates.

for example

Taking 5,11,2013 and the output be 5/11/2013

1 Answers1

0

Use str.replace() ?

date = '11,12,2019'

print(date.replace(',', '-'))

>> 11-12-2019
Alan Kavanagh
  • 9,425
  • 7
  • 41
  • 65