-3

I have a lat/lng string:

"31.20/121.36"

How do I split it by the "/" symbol?

Zernach
  • 95
  • 1
  • 1
  • 11

1 Answers1

1

You can use the .split() function in order to cut it into two parts and it inserts them into a list.

text = "31.20/121.36"

print(text.split("/"))

This outputs ['31.20', '121.36'].

Vassilios
  • 493
  • 2
  • 10