How to Use Echo in Python

Unlike PHP, the Python programming language does not have an "echo" function that produces a string of output information. Instead, Python uses another similar statement called "print" to produce the same effect. The Python print function evaluates each entered string expression in turn and relays it in simplified form. If the entered information contained within the print expression is not considered a string, it converts automatically to a string before output.

Coding
How to Use Echo in Python
credit: DragonImages/iStock/Getty Images

Step

Open a python evaluator or code editor.

Step

Create a variable with which to define your string — for example, x = 'Hello' where "x" is the variable and "Hello" is your string. String values include items such as text, numerical content and expressions.

Step

Type the word "print" with a trailing left parenthesis after creating the variable.

Step

Type the variable you created after the starting parenthesis.

Step

Close the print function with a right parenthesis. You should have something like print(x) with "x" representing your variable.

Step

Enter this print function; the string you entered to represent the variable should be the output return you receive.