How to input a list of dictionaries from the user in python