Advertisement
Felanpro

del

Aug 20th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. '''
  2. You can also delete variables from memory
  3. if you don't need to use them anymore by
  4. using the del statement/keyword.
  5. '''
  6.  
  7. x = 0
  8.  
  9. del x
  10.  
  11. print(x) #Wont work because you already deleted variable x from memory.
  12. #raise NameError
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement