IanSchelly@gmail.com

Problems iterating through a list inside a toolbox function using python.

Discussion created by IanSchelly@gmail.com on Oct 21, 2013
Latest reply on Oct 21, 2013 by JScheirer-esristaff
I have a point file and I need to make a lot of buffers in specific increments but I can't figure out how to interate through a list inside the buffer function. Here is what I have:
import arcpy
city_pts = "C:\Urban_Land_Project\Cities\WI_cities.shp"
buffer_sizes = [1,2,4,7,10,15,20,30]
for x in buffer_sizes:
     arcpy.Buffer_analysis(city_pts, "C:\Urban_Land_Project\City_buffers\WI_city_buffers*km.shp","2 Kilometers" ,"FULL","ROUND","NONE","      #")
I need to have each buffered file to be named "WI_city_buffers*km.shp" with the * being the buffer size. How do I get the arcpy.Buffer_analysis to go through my list?

Outcomes