pets = ['boa', 'cat', 'dog']
for pet in pets:
print(pet)
boa
cat
dog
>>> for pet in pets:
print(pet, end=', ')
boa, cat, dog,
>>> for pet in pets:
print(pet, end='!!! ')
boa!!! cat!!! dog!!!
but what about sep? i tried to replace end by sep but nothing happened but i know that sep is used to separete while printing, how and when can i use sep? what are the differences between sep and end?