title: Is it possible to increment variable names in python?
body: <p>I am trying to achieve a program that breaks down every line of an image into its RGB Figure (this bit i have done) then assign this to a increasing variable that corresponds to its row number. I want to achieve the following result:</p>
  
  <pre><code>(input) line1
  (output) (whatever the value is, in this form ([(255, 255, 255), (255, 255, 255)]) e.g.
  </code></pre>
  
  <p>so far i have done this:</p>
  
  <pre><code>from PIL import Image
  import os
  os.chdir("C:\\Users\\User\\Desktop\\CWD")
  im = Image.open("bw.jpg")
  data_RGB = im.convert("RGB")
  actual = list(data_RGB.getdata())
  size = im.size[0]
  counter = 0
  
  while counter != size:
      lowerbound = 0
      upperbound = size
      print (actual[(0+lowerbound):(0+upperbound)])
      print("")
      #current_line = (actual[(0+lowerbound):(0+upperbound)])
      print("")
      counter = counter + 1
      (lowerbound) = int(lowerbound) + size
      (upperbound) = int(upperbound) + size
  </code></pre>
  
  <p>I have tried to solve the problem down this route:</p>
  
  <pre><code>for x in list(range(size+1)):
  print("line", x, "is", current_line)
  </code></pre>
  
  <p>but ofcource this prints what current_line is at a static point, the first point that it is.</p>
  
  <p>So my question is, is there a way in which i can increase my variable name by +1 for the corresponding row.</p>
  
  <p>Can anyone give me a start for a solution?</p>