Created
September 14, 2012 19:27
-
-
Save axiak/3724152 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SEGMENT_TABLE = { | |
1: (39.5, 40), | |
2: (40, 50), | |
} | |
def get_segment(position): | |
for key, (lower, upper) in SEGMENT_TABLE.items(): | |
if lower <= position < upper: | |
return key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment