From the course: Certified Entry-Level Python Programmer (PCEP-30-02) Cert Prep
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Output messages to the console - Python Tutorial
From the course: Certified Entry-Level Python Programmer (PCEP-30-02) Cert Prep
Output messages to the console
- [Instructor] One of the most common operations that we do in Python is to output messages to the console. We do that using the print function. The print function will output messages to the standard output from the operating system. That is typically the console. The basic usage of that print function is just to pass any value as an argument in parenthesis. For example, print "This is an special message." But also it's possible to send multiple elements just by using comma. And those elements can even be of different types. They will all be converted into strings for them to be printed on the screen. But when you're sending multiple elements, there is no separator between them, not even a space. So if you want, you can add a separator. In this case, after you pass all the elements that you want to print, in the last comma, you can add a named argument that is called sep, s-e-p, equals. So that's the separator. And you…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Fundamentals of Python12m 52s
-
(Locked)
Writing and executing Python code12m 46s
-
(Locked)
Python code structure10m 32s
-
(Locked)
PEP 8 style guidelines and indentation4m 30s
-
(Locked)
Variables and literals10m 55s
-
(Locked)
Output messages to the console4m 7s
-
(Locked)
Defining numerical representations9m 30s
-
(Locked)
Working with strings12m 14s
-
(Locked)
Using operators8m 57s
-
(Locked)
Receiving input data from the console5m 52s
-
-
-
-
-