Remember when you obtain a parameter with GetParameterAsText you get it as text, when you use GetParameter you will directly have a list of numeric values. To explain this a little more, please see the example below:
In my tool I collect a list of values:
![](https://community.esri.com/legacyfs/online/391689_pastedImage_1.png)
The script below contains this:
def main():
import arcpy
sea_level = arcpy.GetParameterAsText(0)
arcpy.AddMessage("\nGetParameterAsText(0)")
arcpy.AddMessage("sea_level={0}".format(sea_level))
arcpy.AddMessage("type={0}".format(type(sea_level)))
lst_sea_level = sea_level.split(";")
arcpy.AddMessage("lst_sea_level={0}".format(lst_sea_level))
arcpy.AddMessage("type of first element={0}".format(type(lst_sea_level[0])))
lst_values = [int(v) for v in lst_sea_level]
arcpy.AddMessage("lst_values={0}".format(lst_values))
arcpy.AddMessage("type of first element={0}".format(type(lst_values[0])))
lst_sea_level = arcpy.GetParameter(0)
arcpy.AddMessage("\nGetParameter(0)")
arcpy.AddMessage("lst_sea_level={0}".format(lst_sea_level))
arcpy.AddMessage("type of first element={0}".format(type(lst_sea_level[0])))
if __name__ == '__main__':
main()
In the first part it reads the parameter as text and you can see how it is processed to get a list of values. In the second part starting on line 19, I read the same parameter but now directly as a list without converting it to string. The result is this:
![](https://community.esri.com/legacyfs/online/391690_pastedImage_2.png)
In your case it will be much easier to use GetParameter then using GetParameterAsText.