0

I want to iterate the list over 500+ times.

right now I am using by single method:

col1,col2,col3,col4,col5,col6,col7,col8,col9,col10 = [],[],[],[],[],[],[],[],[],[] 

     for x in range [3,500]:
        col+str(x) = [] 

the "col" should be constant and iteration should be over 500 times

Adam.Er8
  • 12,675
  • 3
  • 26
  • 38
Ron Ledger
  • 35
  • 7

1 Answers1

4

just use a list (of lists):

cols = []
for x in range(500):
    cols.append([])

then you can access each individual col by cols[42] (or any other index...)

Adam.Er8
  • 12,675
  • 3
  • 26
  • 38