Question: Write a function, called senators_info, that takes a filename string # as an argument. It should load the json file and extract the Senator's #

Write a function, called senators_info, that takes a filename string # as an argument. It should load the json file and extract the Senator's # following information:

# First name

# Last name

# State

# Party

# Start date (since when they've been Senators)

# Congress number (which sessions of Congress they were Senators for)

# Contact form

# Phone number

# Twitter handle

# Birthday

# Nickname

# The function should write the senators information to a json file # called senators_info.json. Use an indent of 2 to make the data more # readable. The function should also return the data, this should # be a list of dictionaries. # Hint: You may want to use the get() method when getting the data

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!