title: What is difference between Discard() and Remove() function in python 3 sets
body: <p>I have a code for discard and remove function in Python 3. Can anyone explain the difference?</p>
  
  <p>remove() function :</p>
  
  <pre><code>num_set = set([0, 1, 2, 3, 4, 5])  
   num_set.remove(0)  
   print(num_set)  
  o/p
  {1, 2, 3, 4, 5} 
  </code></pre>
  
  <p>discard() function :</p>
  
  <pre><code>num_set = set([0, 1, 2, 3, 4, 5])  
   num_set.discard(3)  
   print(num_set)  
  o/p:
  {0, 1, 2, 4, 5}  
  </code></pre>