title: Appending an id to a list if not already present in a string
body: <p>I am trying to check if id is in a list and append the  id only if its not in the list using the below code..however I see that the id is getting appended even though id is already present in the list.. can anyone provide inputs on what is wrong here?</p>
  
  <pre><code>   list = ['350882 348521 350166\r\n']
      id = 348521
      if id not in list:
          list.append(id)
      print list
  
  OUTPUT:-
  ['350882 348521 350166\r\n', 348521]
  </code></pre>