title: Python - Passing a list as argument to class
body: <p>So, I have the following code:</p>
  
  <pre><code>locations = [0,1]
  
  class Draw:
      def __init__(self, locations):
          self.locations = locations
  
      def platforms(self):
          print(self.locations)
  
  Draw.platforms(locations)
  </code></pre>
  
  <p>And the terminal gives me:</p>
  
  <pre><code>AttributeError: 'list' object has no attribute 'locations'
  </code></pre>
  
  <p>Is there a specific way to pass a list as an argument? I'm new and I don't understand why it works with a int argument but not with a list.</p>
  
  <p>I want to know why this is happening and what can I do about it.</p>
  
  <p>Thanks in advance.</p>