Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions

Question

Who are the primary participants in a start-ups new-venture team?

Answered: 1 week ago

Question

Explain the process of MBO

Answered: 1 week ago

Question

6. Have you used solid reasoning in your argument?

Answered: 1 week ago