python list clear memory code example Example: deleting a list in python # deletes whole list thislist = ["apple", "banana", "cherry"] del thislist