[Easy Python] continue vs pass
continue used only in the loop to skip the rest of the code without stopping all iteration.
pass used to indicate the empty body of a function, loop, method, etc. Code after pass will be executed.
my_list = ['one', 'two', 'three', 'four']
for item in my_list:
if item == 'two':
pass
if item == 'three':
continue
print(item)
Output:
one
two
four