Question
The data used for this assignment is a subset of the data found in: https://www.ontario.ca/data/bridge-conditions def read_data(csv_file: TextIO) -> List[List[str]]: Read and return the contents
The data used for this assignment is a subset of the data found in: https://www.ontario.ca/data/bridge-conditions
def read_data(csv_file: TextIO) -> List[List[str]]: """Read and return the contents of the open CSV file csv_file as a list of lists, where each inner list contains the values from one line of csv_file.
Docstring examples not given since results depend on csv_file. """
lines = csv.reader(csv_file) data = list(lines)[2:] return data
Please make this get_total_length_on_highway function in python, thank you
def get_total_length_on_highway(bridge_data: List[list], highway: str) -> float: """Return the total length of bridges in bridge_data on highway. Use zero for the length of bridges that do not have a length provided. If there are no bridges on highway, return 0.0.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started