Input and output (IO) is a major part of any programming language - being able to receive inputs and produce outputs are what makes a program interactive.
Output in Python is normally achieved using the
print ("Hello world!")
print ("Hello", "world!")
Input in Python varies based on the version. Version 3.x introduced the
method of getting an input from the user whereas previous versions relied on
# Prior to Python 3.x print (raw_input("Please insert your name")) # Python 3.x and later print (str(input("Please insert your name")))
Notice in Python 3.x the use of the
str method to convert the input to
an appropriate format.