Solution: Favorite Quote
Explore how to use the print function in Python to display text output. Learn to work with strings and see how Python shows exactly what is inside quotation marks, helping you understand basic output commands and building your coding skills.
We'll cover the following...
We'll cover the following...
In Python, the print() function is used to display text or values on the screen. Whatever you write inside the parentheses () will be shown as output.
In this example:
print("May the Force be with you.")
printis the function that tells Python to display something.The text
"May the Force be with you."is enclosed in quotation marks, which means it’s a string (a sequence of characters).When you run the code, Python prints exactly what’s inside the quotes to the output window.