title: How do I assign an element from one list as the value of an element from another list and print the result?
body: <p>I need to assign an element from one list as the value of an element in another list. How do I do it?   </p>
  
  <p>I had a string whose characters I stored as a list-A and I have another list-B whose elements will act like variables. I tried using a for loop where each iteration in the list-B will contain elements from list-A as their value. I know it is picking the value from the last iteration of the List-A. I tried using a nested for loop; the First one for the List-B and the second one for the List-A. All it does is print all the elements of list-A for every iteration of List-B.</p>
  
  <pre><code>item = "Cheese Burger"
  ends = []
  end_num = []
  for i in range(1,13):
      end_num.append(i)
  print(f"end_num = {end_num} \n")
  
  for num in end_num:
      end = f"end{num}"
      #print(end)
      ends.append(end)
  print(f"end list = {ends} \n")
  
  characters = []
  for char in item:
      characters.append(char)
  characters.pop(6)
  print("Character list = ", characters, "\n")
  #print(len(characters))
  
  for iteration in ends:
      result = '{0} = "{1}"'.format(iteration,char)           
      print(result)
  </code></pre>
  
  <p>For a string "Cheese Burger" as input, the expected output is: </p>
  
  <pre><code>end1 = "C"
  end2 = "h"
  end3 = "e"
  end4 = "e"
  end5 = "s"
  end6 = "e"
  end7 = "B"
  end8 = "u"
  end9 = "r"
  end10 = "g"
  end11 = "e"
  end12 = "r"
  </code></pre>
  
  <p>Actual output :</p>
  
  <pre><code>end1 = "r"
  end2 = "r"
  end3 = "r"
  end4 = "r"
  end5 = "r"
  end6 = "r"
  end7 = "r"
  end8 = "r"
  end9 = "r"
  end10 = "r"
  end11 = "r"
  end12 = "r"
  </code></pre>