BeginnerLesson 1 of 12
Hello World & print – Python
Your first program and how output works.
A Python program is simply a text file. You use print() to display something on the screen.
print("Hello World!")
print("I am learning", "Python")
print("Number:", 42)Comments start with # and are ignored. With sep and end you control the format:
# This is a comment
print("a", "b", "c", sep="-") # a-b-c
print("Without line break", end="")
print(" – continues on the same line")TipClick "Run" to try the code right in your browser. Feel free to modify it – in the Exercises section you can write your own solutions.