Trying to use the ExtractByAttributes for rasters so that I have multiple attribute values that I want to extract.
This works fine: myraster = arcpy.sa.ExtractByAttributes("source_raster", "VALUE IN (1,8,10)")
but obviously I can't repeat this procedure for hundreds of layers by manually inserting the desired attribute values for each. Anything I've tried for replacing the numbers with a variable has not worked. It doesn't seem to take a list of strings or integers, nor does it help to strip the brackets from around the list, or to have the numbers as a single string. I've even tried with a single number instead of many and I just can't get it to work without inserting the actual number in there. What on earth am I missing? Needless to say I'm a beginner with Python.
Many thanks for any ideas