title: How to define a list in a function with an input name?
body: <p>I'm defining a function that creates a list with input values. 
  I have 2 questions:</p>
  
  <ol>
  <li>How to define the list's name (n) from an input?</li>
  <li>How to transform numeric items in float type?</li>
  </ol>
  
  <p>n=name of the list from an input</p>
  
  <p>I've tried to assign the list to n, but after running the function, when writing the list name, it gave me a NameError.</p>
  
  <p>About the 2nd issue, I've tried to turn the input into a float, but it didn't work and the list's numeric items were still strings.</p>
  
  <pre><code>def createlist():
      n=input("What's the list's name?"+'\n')
      a=input("Insert the list items"+'\n')
      l=[a]
      while a!='':
          b=input('\n')
          m=[b]
          l=l+m
          a=b
      l=l[:-1]
      print(n,'=',l)
      n=l
  
  createlist()
  
  n='List'
  
  List = ['banana', 'apple', 'peach', '4.33', '56.243']
  
  List
  </code></pre>
  
  <blockquote>
    <p>NameError: name 'List' is not defined</p>
  </blockquote>
  
  <p>I expect output of List to be the created list, but it actually gives me a NameError. 
  When writing a number as item it goes into the list as a string, not an int.</p>
  
  <p>I'd like some help. Thanks.</p>