Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def codeChecker(code, wetland_type):
- match_dict = {'ay': ['LOBA', 'LOFP'],
- 'bg': ['LEBA', 'LEFP', 'LEFR', 'TEBA', 'TEFL', 'TEFR', 'TESL']}
- if wetland_type not in match_dict[code]:
- return code
- else:
- return 'No error'
- codeChecker('ay', 'LOBA') # wetland type in allowable values
- # returns 'No error'
- codeChecker('ay', 'TEBA') # wetland type outside of allowable values
- # returns 'ay'
Advertisement
Add Comment
Please, Sign In to add comment