I run a searchcursor that prints results. How do I use those results to build an SQL Expression in Python?
lyr = "layer name"
events = arcpy.da.SearchCursor(lyr, ['Event'])
unique_events = list(set([row[0] for row in events]))
unique_events
print(unique_events)
I then get values
[1, 2, 3, 4, 5, 6]
How do I take those values in python and insert them in sql expression for whats in the ()?
arcpy.management.SelectLayerByAttribute("Lyer2", "NEW_SELECTION", "Event IN ()", None)