fork download
  1. import re
  2. coordstr = '102030N0102030E203040N0203040E304050N0304050E405060N0405060E'
  3. coords = re.findall(r'\d+[NS]\d+[EW]', coordstr)
  4. for x in coords:
  5. print(x)
  6.  
Success #stdin #stdout 0.03s 9412KB
stdin
Standard input is empty
stdout
102030N0102030E
203040N0203040E
304050N0304050E
405060N0405060E