Question: Task 3 [ 1 0 points ] Function splithalines ( ) processes the booking lines into booking parts. Strip each line of the ' :
Task points
Function splithalines processes the booking lines into booking parts. Strip each line of the :
characters, convert its number substrings into integers, and return a list where each item list
contains the parts for one booking.
The parts at indices and in a booking list are integers. Also, parts at index or higher are
integers. If any substrings cannot be converted into an integer, your function should return an error
message as shown below.
Signature: shlit linesbookinglines
bokkingalioes, is a list containing booking lines represented as strings
The return value is a D list where each item list contains the parts of a booking. If a substring
could not be converted, return the string An int was expected instead of
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
