Python program that stores information in tables