Deleting user defined variables is simple in python. You just pass the list of variables to be deleted to the function del()
1 2 3 4 5 6 7 8 9 10 |
# Creating sample Variables intVar1=10 intVar2=20 strVar="hello" # Printing all the user variables created in Jupyter %whos |
1 2 3 4 5 |
# Deleting the variables intVar1 and strVar del(intVar1,strVar) # listing the variables again %whos |
Sample output:
Author Details
Lead Data Scientist
Farukh is an innovator in solving industry problems using Artificial intelligence. His expertise is backed with 10 years of industry experience. Being a senior data scientist he is responsible for designing the AI/ML solution to provide maximum gains for the clients. As a thought leader, his focus is on solving the key business problems of the CPG Industry. He has worked across different domains like Telecom, Insurance, and Logistics. He has worked with global tech leaders including Infosys, IBM, and Persistent systems. His passion to teach inspired him to create this website!