title: insert a variable in a Set in python
body: <p>I have a problem with inserting vars in Python sets. Does anyone know what I got:   <strong>s.insert(len(s),x)</strong> ?</p>
  
  <p>My problem is when I wanna <strong>insert</strong> or <strong>add</strong> x into a set or a list.</p>
  
  <p>Why can't I do it? And how to fix this problem?</p>
  
  <p>My code: </p>
  
  <pre><code>import nltk
  import Set
  
  FILE=open("out.txt", "w")
  FILE.writelines("this is to show why using NNs :)!!!!\n")
  
  text1=raw_input()
  FILE.writelines("first text loaded.....\n")
  sentences1=text1.split('.')
  FILE.writelines("first text splited.....\n")
  
  text2=raw_input()
  FILE.writelines("second text loaded.....\n")
  sentences2=text2.split('.')
  FILE.writelines("second text splited.....\n")
  
  
  
  s=['a','b']
  FILE.writelines("\n NNs for first:\n")
  for sen in sentences1:
      tokens1= nltk.word_tokenize(sen)
      tagged1 = nltk.pos_tag(tokens1)
      for (x, y) in tagged1:
          if y=='NN':
              FILE.writelines(x+",")
              s.insert(len(s),x)
  FILE.writelines(len(s1))
  
  
  FILE.writelines("\n NNs for second:\n")
  for sen in sentences2:
      tokens2= nltk.word_tokenize(sen)
      tagged2 = nltk.pos_tag(tokens2)
      for (x, y) in tagged2:
          if y=='NN':
              FILE.writelines(x+",")
              s2[len(s2)]= x
  FILE.writelines(len(s2))
  
  print "********temoum**********"
  FILE.close()
  </code></pre>