Implementing raw input in a method
<p>I have the following class below but struggling to make the script work as intended. </p>

<pre><code>class firstClass:
   def test(self):
      enter = raw_input()
      books = enter.split()
      books = []
      for index in range(len(books)):
        print 'Current Books :', books[index]

mybooks = firstClass()
mybooks.test()
</code></pre>

<p>My end goal is to have a situation where if i enter <code>book1</code>, <code>book2</code> <code>book3</code> and so forth, i get a result like so ( I dont want to limit it to just three books)</p>

<pre><code>Current Books, book1
Current Books, book2
Current Books, book3
</code></pre>

<p>Just remove 5th line, your code will work fine.</p>

<pre><code>class firstClass:
   def test(self):
      enter = raw_input()
      books = enter.split()
      for index in range(len(books)):
        print 'Current Books :', books[index]

mybooks = firstClass()
mybooks.test()
</code></pre>

python python-2.7