#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...
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.