title: Create list of tuples , tuple elements taken as Input
body: <p>I wish to create a list whose members are tuples, taken from console input. I've seen other questions which describe about tuples and lists. But how to create tuples from input and append them to list till the choice to take tuple elements is no, 'n'? I tried the following code. </p>
  
  <pre><code>"""
  Create the tuples into a list.
  """
  
  def createTupledList() :
      l=[]
      print("Add an element for the tuple ? y/n : ")
      ch=str(input())
      while(ch=='y') :
          print("Enter the tuple element : ")
          i=input()
          l=l.append(tuple(i))
          print("Add an element for the tuple ? y/n : ")
          ch=str(input())
      return l
  
  
  
  l2=createTupledList()
  print(l2)
  </code></pre>
  
  <p>Please help.</p>
  
  <p>My inputs and error output :</p>
  
  <pre><code>C:\Users\vikranth\myproject\Python\Lists\Day 0&gt;py tuplesortlist.py
  Add an element for the tuple ? y/n :
  y
  Enter the tuple element :
  1
  Add an element for the tuple ? y/n :
  y
  Enter the tuple element :
  2
  Traceback (most recent call last):
    File "tuplesortlist.py", line 19, in &lt;module&gt;
      l2=createTupledList()
    File "tuplesortlist.py", line 12, in createTupledList
      l=l.append(tuple(i))
  AttributeError: 'NoneType' object has no attribute 'append'
  </code></pre>