#List comprehension: Pop_options = [int(p) for p in Pop_option.split(";")] #Map function Pop_options = map(int, Pop_option.split(';')) #Loop Pop_options=[] for p in Pop_option.split(';'): Pop_options.append(int(p))
4568
Pop_option_str = arcpy.GetParameterAsText(0) Pop_option = int(Pop_option_str)
Pop_option_str = arcpy.GetParameterAsText(0) try: Pop_option = int(Pop_option_str) # try conversion except ValueError: arcpy.AddError('Input was not integer...') # input was invalid...
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.