title: How to print only when something gets added into a list?
body: <p>I got an idea where you have a list etc. of <code>[1,2,3,4,5]</code> and my idea was that incase a number of those gets pop/deleted then it shouldn't print. Let's say etc. we remove number <code>3</code>. In that case our list would be <code>[1,2,4,5]</code> and the script should be usual. But whenever a value gets added to a list. Then print out the whole list so etc. add number <code>6</code> &ndash; > <code>[1,2,4,5,6]</code> - Print out the whole list.</p>
  
  <p>The problem is that I don't want to get notified whenever there has been anything deleted so my idea from the beginning was to check the length of a list and then notify whenever it gets changed but then I realized that the wrong I am doing is that it going to notify whenever it gets added and/nor deleted which now why I am here.</p>
  
  <p>What I did was a compare of a <code>new_name_list</code> vs <code>old_name_list</code> but this one is going to notify for whatever change that would be happens basically.</p>
  
  <pre><code>import names
  
  
  def get_value(value):
  
       value = names.get_full_name()
  
       names_list = []
       for names in names.get_last_name():
          names_list.append(names)
          break
  
       identifier = ('{} {}').format(value, names_list)
  
       return identifier
  
  
  if __name__ == '__main__':
  
      old_name_list = get_value()
  
      while True:
          new_name_list = get_value()
          if new_name_list not in old_name_list:
              print("Yay new name added")
  
          else:
              print('I will re try again in 5 sec')
              time.sleep(5)
  </code></pre>
  
  <p>My question is - How can I make it so it print only whenever the value of <code>names_list</code> will get notified <strong>ONLY</strong> when something gets added but not deleted?</p>
  
  <p>etc.</p>
  
  <pre><code>1. [1,2,3,4,5] - print from beginning
  2. [1,2,4,5] - Deleted 3 - Do not print
  3. [1,2,4,5,6] - Print list, something got added
  4. [1,4,5,6] - Deleted 2 - Do not print
  5. .........
  </code></pre>