I'm new to Python and working on a task where I need to update a list of dictionaries from a customer input.
I have a list as follows:
drinks_info = [{'Pepsi': 2.0}, {'Coke': 2.0}, {'Solo': 2.50}, {'Mt Dew': 3.0}]
If the user inputs: Pepsi: 3.0, Sprite: 2.50
Then the list should update to: [{'Pepsi': 3.0}, {'Coke': 2.0}, {'Solo': 2.50}, {'Mt Dew': 3.0}], {'Sprite': 2.50}]
Any help is appreciated. Thanks in advance.