I think this should be relatively simple, but I can’t figure it out. I have a string that represents coordinates, +27.5916+086.5640 and I need to put a comma in between the longitude and latitude so I get +27.5916,+086.5640.
I’m looking through the API but I can’t seem to find something for this.
Oh and I have to use Python 2.7.3 since the program I writing for doesn’t support Python 3.X.
If your coordinates are
c, then this would work. Note, however, this will not work for negative values. Do you have to deal with negatives as well?For dealing with negatives as well.
OUTPUT
And for negatives: