title: Is this an ideal way to automate object instantiation using functions?
body: <p>I'm trying to design a function in Python which instantiates a number of objects based on a user input. I've derived one which works, and it looks as follows</p>
  
  <pre><code>class Node(): ...
  
  def initialise():
      binary_tree=[]
      opt=int(input("Enter the number of nodes you want\n"))
      for i in range(opt):
          a=Node()
          binary_tree.append(a)
  </code></pre>
  
  <p>although I'm not sure that this is the ideal way to do this.</p>
  
  <p>Is there a better way of programming a function such as the one I've described, or is the above method sufficient for efficiency and clarity purposes?</p>
  
  <p>Any responses are appreciated, thank you in advance.</p>