Parsons Problem

Write a for loop to add a 'programming_languages' key, and the value ['Python'], to each dictionary in your list.

  1. In the space below, drag lines of code from the rows on the left to the empty rows on the right.
  2. Arrange the lines of code in the logical order that will produce the desired output.
  3. To indent a line of code, follow the yellow highlighting when positioning it over an empty row.
  4. To run your code, click the Run code button. The output of running your code, including any error messages, will appear in the panel at the bottom
  5. Click the Reset button to clear the code space on the right and start over.

Problem Setup

Assume that the following code has run already in this session.



team = [{'name': 'Alex', 'state': 'DC'}, {'name': 'Marcus', 'state': 'VA'}]

Compose your code here

for person in team:
person['programming_languages'] = ['Python']
print(team)

Python output

>>Python output here...