livepython.net

9. Python Program to Print One Line with Several print() Calls

Easysep and end

Overview

In this exercise, you’ll learn how to use Python’s print() function and its end option to print multiple things on the same line. This will help you control when Python moves to a new line.

Problem Statement

Write a Python program that prints a sentence using multiple print() statements, but ensures the entire output appears on a single line.

I Love Live Python

Note: One print function can only take one word. Use multiple print function, each for every word.

Input

  • No input is required.

Output

The output should appear as:

I Love Live Python

Practice using the end parameter effectively to control printed output. Happy coding!

Learn this firstChapter 2 · print() sep and end Parameters Explained
solution.py
# write your code here

EXPECTED OUTPUT

1I Love Live Python

YOUR OUTPUT

Press Run to see your output here. Lines are compared with the expected output.