I have a list of strings where string that start in lowercase should be removed and I made this code
def remove_names(name_list):
for i in name_list:
print(i[0])
if i[0].islower():
name_list.remove(i)
countries_list = ["New Zealand", "germany", "australia", "Canada", "China"]
remove_names(countries_list)
print(countries_list)
for some reason the string "australia"
doesn't get iterated, any reasons why?