-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

  • Use a date formatter – AK47 Jan 20 '19 at 23:35
  • Read the link in the duplicate provided. Ultimately, strictly speaking about the string manipulation you want to do, you want to use the string replace method. – idjaw Jan 20 '19 at 23:39

1 Answers1

0

Use str.replace() ?

date = '11,12,2019'

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

>> 11-12-2019
AK47
  • 8,646
  • 6
  • 37
  • 61