You are viewing a single comment's thread. Return to all comments →
import re pattern = r'^\([+\-]?(((\d|[1-8]\d)(\.\d+)?)|90(\.0+)?), [+\-]?(((\d{1,2}|1[0-7]\d)(\.\d+)?)|180(\.0+)?)\)$' for _ in range(int(input())): print('Valid' if re.match(pattern, input()) else 'Invalid')
Seems like cookies are disabled on this browser, please enable them to open this website
Detecting Valid Latitude and Longitude Pairs
You are viewing a single comment's thread. Return to all comments →