I want to enumerate through an array called zones; within each zone I want to enumerate through another array zoneIDX{X} (X is the index of the zones array) When I make a new variable called snotelIDX and then try to enumerate through the array that the new variable is associated with it enumerates through the string instead of the array
if I print snotelIDX it prints the right thing
zoneIDX0
zoneIDX1
zoneIDX2 and so on
but enumerates through s n o t e l I D X
thanks
Code:
zones=["Zone 1 - Yellowstone NP","Zone 2 - Absaroka Mtns","Zone 7 - Owl Creek/Bridger Mtns","Zone 8 - Bighorn Mtns West"] ## Snotels in Zone 1 - Yellowstone NP zoneIDX0=["CANYON","LEWIS LAKE DIVIDE","SNAKE RIVER STATION","SYLVAN LAKE","SYLVAN ROAD","THUMB DIVIDE","TWO OCEAN PLATEAU"] ## Snotels in Zone 2 - Absaroka Mtns zoneIDX1=["BEARTOOTH LAKE","BLACKWATER","BURROUGHS CREEK","CASTLE CREEK","EVENING STAR","KIRWIN","MARQUETTE","PARKER PEAK","TIMBER CREEK","WOLVERINE","YOUNTS PEAK"] ## Snotels in Zone 7 - Owl Creek/Bridger Mtns zoneIDX2=["OWL CREEK"] ## Snotels in Zone 8 - Bighorn Mtns West zoneIDX3=["BALD MOUNTAIN","BONE SPRINGS DIVIDE","POWDER RIVER PASS","SHELL CREEK"] for j, v in enumerate(zones): IDX = j snotelIDX = "zoneIDX" + str(IDX) for k, w in enumerate(snotelIDX):
zoneIDX0
zoneIDX1
zoneIDX2 and so on
but enumerates through s n o t e l I D X
thanks
Comment