
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
How to print "Hello World!" using Python?
The basic way to do output to screen is to use the print statement.
>>> print 'Hello, world' Hello, world
To print multiple things on the same line separated by spaces, use commas between them. For example:
>>> print 'Hello,', 'World' Hello, World
In Python 3, all print is a function and not a statement. Hence its arguments need to be surrounded by parenthesis. For example,
>>> print("Hello", "world") Hello world
- Related Articles
- Python Program to Print Hello world
- Swift program to print Hello World!
- Haskell Program to print Hello World!
- C Program to print “Hello World!” without using a semicolon
- Print “Hello World” in C/C++ without using header files
- Print “Hello World” without using any header file in C
- Hello World using Perl.
- Print Hello World without semicolon in C++
- How to write first Hello World program using CGI programming in Python?
- Display hello world using React.js
- Print “Hello World” with empty or blank main in C++
- How to create Android Hello World App?
- How to write "Hello World" in C#?
- How to write "Hello, World!" program in JavaScript?
- How to write "Hello World" Program in C++?

Advertisements