Answer the question
In order to leave comments, you need to log in
How to implement rounding by squares in a string?
How to implement rounding by squares in a string with step (5) and remove unnecessary values?
Input:
Direction
N 10-44-2 W
N 78-32-27 W
N 40-12-5 E
S 58-50-10 E
N 88-32-50 E
End result:
Direction
N 10-45 W
N 78 -30 W
N 40-10 E
S 58-50 E
N 88-30 E
Answer the question
In order to leave comments, you need to log in
If it's really stupid
qwe = "N 10-44-2 W".split(" ")
qwe[0]+" "+qwe[1][0:5]+" "+qwe[2]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question