By default, Python’s print() function appends a newline character ( \n ) at the end of every output, causing subsequent prints to appear on a new line. While this is often convenient, certain tasks—like building progress bars, creating real-time timers, or formatting complex logs—require more control over line endings.
Output: Hello World
items = ["apple", "banana", "cherry"] for item in items: print(item, end=" | ")
❌