Can you believe that after two years we still use the same old variable/function called “delete”? We’ve made a few changes to the code, but the biggest change is the way we use it.
Yes, it is time to add a new function. We have long relied on the fact that Python can do a findall function to pull out, for example, all of the words in a string. The findall function, however, simply returns a list. Python will throw an error if you try to pass it a variable or method. The new function is a find-all function.
With this new function, you can use a very simple and short syntax.
We are using a slightly modified version of this pattern to do something rather strange, that is, create a function that can take and return any variable type. This makes it easier to use that function in other places. Our new function, delete, adds a new function that takes a variable and returns it’s value. If you see delete in the code below, then you will see it in the code above.
This is a very simple example of how our new function can be used. It can also be used to delete variable names in your code.
delete is a very simple function that creates a new variable and returns a new variable. If you see delete in the code below, then you will see it in the code above.
We can use the new function to do a lot of things in our code.
Another nice feature of our new function is that it can be used to remove variables from the current scope. In this case we are removing the variable name that is already in the code.
The old way to do this was to remember the name of the variable and remove it by using the name in the code. With the new function the name is not part of the code, so you can simply use the new function to remove the variable.
You can also remove variables from the current scope by using the ‘delete’ function again, but then the variable will no longer be part of the code.