cara menghapus dalam python
#x will be deleted
print("x\b")
kimwashi
#x will be deleted
print("x\b")
# the list.remove(object) method takes one argument
# the object or element value you want to remove from the list
# it removes the first coccurence from the list
generic_list = [1, 2, 2, 2, 3, 3, 4, 5, 5, 5, 6, 8, 8, 8]
generic_list.remove(1)
# The Generic list will now be:
# [2, 2, 2, 3, 3, 4, 5, 5, 5, 6, 8, 8, 8]
"""
Since foo is a global, you can delete it from the global definitions:
"""
def delete_func(func):
del globals()[func.func_name]