title: AttributeError: 'str' object has no attribute 'insert'
body: <p>I'm trying to insert a piece of text into my linked list. However, when ever I try to do this I get an error "AttributeError: 'str' object has no attribute 'insert'". I am writing this in python 3.3.</p>
  
  <pre><code>class Node:
  def __init__(self, item= None , link= None ):
      self.item = item
      self.next = link
  
  def __str__(self):
      return str(self.item)
  
  
  class List:
  def __init__(self):
      self.head = None
      self.count = 0
  
  def is_empty(self):
      return self.count == 0
  
  def is_full(self):
      return False
  
  def reset(self):
      self.__init__()
  
  def __len__(self):
      return self.count
  
  def _getNode(self, index):
      node = self.head
      for _ in range(index):
          node = node.next
      return node
  
  def insert(self, index, item):
      if index &lt; 0:
          index = 0
  
      elif index &gt; len(self):
          index = len(self)
  
      if index == 0:
          self.head = Node(item, self.head)
      else:
          node = self._getNode(index - 1)
          node.next = Node(item, node.next)
  
      self.count += 1
  
  def delete(self, index):
      if self.is_empty():
          raise IndexError("List is empty")
      if index &lt; 0 or index &gt;= len(self):
          raise IndexError("Index is out of range")
  
      if index == 0:
          self.head = self.head.next
      else:
          node = self._getNode(index - 1)
          node.next = node.next.next
  
      self.count -= 1
  
  import LinkedList
  text= LinkedList.List()
  
  def insert_num(line,text):
      text.insert(line - 1,text)
  
  def delete_num(line):
      if line is None:
          text.reset
      else:
          text.delete(line)
  
  def print_num(line):
      if line is None:
          i= 0
          while i&lt; line.count:
              item= text._getNode(i)
              print (item)
      else:
          print(text._getNode(line))
  
  while True:
      print("1. Insert")
      print("2. Delete")
      print("3. Print")
      print("4. Quit")
      command = int(input())
      if command == 1:
          line = int(input("At what line do you wish to insert your text?: "))
          text = input("Text: ")
          insert_num(line,text)
      elif command == 2:
          line = int(input("What line do you wish to delete?: "))
          delete_num(line)
      elif command == 3:
          line = int(input("What line do you wish to print?: "))
      elif command == 4:
          break
      else:
          print("invalid input, please select one of the following numbers:")
  </code></pre>