Managing exceptions in Python
Introduction[edit]
The list type is a container that holds a number of other objects, in a given order. The list type implements the sequence protocol, and also allows you to add and remove objects from the sequence.[1]
Lists are a primitive data type, very, very helpful for storing and changing data.
Example of a function[edit]
try:
number = input("Enter a number ")
print("Your number was: " + str(number))
except NameError:
print("Please use a number.")
This example was swiped from the official Python documentation which you should read. [2]