I have written this code but it is not removing all the elements from the list but only 3 items are removing. Please check what i am doing wrong
names = ["John","Marry","Scala","Micheal","Don"]
if names:
 for name in names:
  print(name)
  print(f"Removing {name} from the list")
  names.remove(name)
print("The list is empty")
 
     
     
     
    