A simple program that displays “Hello, World!”. It’s often used to illustrate the syntax of the language.
To understand this example, you should have the knowledge of the following Python programming topics:
Source Code
# This program prints Hello, world! print('Hello, world!')
Output
Hello, world!
In this program, we have used the built-in print()
function to print the string Hello, world!
on our screen.
By the way, a string is a sequence of characters. In Python, strings are enclosed inside single quotes, double quotes, or triple quotes.
Related posts:
Python Objects and Classes
Python Decorators
Python round()
Python Closures
Python Namespace and Scope
Python Program to Display Fibonacci Sequence Using Recursion
Python Iterators
Applied Text Analysis with Python - Benjamin Benfort & Rebecca Bibro & Tony Ojeda
Python Operator Overloading
Python Program to Merge Mails
Python String ljust()
Building Machine Learning Systems with Python - Willi Richert & Luis Pedro Coelho
Python Program to Create a Long Multiline String
Python float()
Python Program to Slice Lists
Python vars()
Python Program to Find the Sum of Natural Numbers
Python List index()
Python Dictionary
Python Deep Learning Cookbook - Indra den Bakker
Python input()
Python Program to Compute the Power of a Number
Python String format_map()
Python String upper()
Python Program to Display the multiplication Table
Python exec()
Python Program to Check if a Number is Positive, Negative or 0
Python Program to Find Hash of File
Python zip()
Python List insert()
Python Dictionary values()
Python break and continue