This is my code:
the_list = ['Lily', 'Brad', 'Fatima', 'Zining']
for name in the_list:
print(name)
if name == 'Brad':
the_list = ['Tom', 'Jim', 'Garry', 'Steve']
else:
continue
How do I make it so that the for loop now runs through the new list
I know I could just make a new for loop in the if statement but that's not what i want it to do.