Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

test b line 1 1,2,3,4,5,6,7,8 55,0,90,09,1,2,3, 8,9,7,6,8,7,6 3,43,5,8,2,4,1 , . C Code bbb - Notepad File Edit Format View Help In [3] def mi_func(P): bfirst

test b line 1

1,2,3,4,5,6,7,8 55,0,90,09,1,2,3, 8,9,7,6,8,7,6 3,43,5,8,2,4,1

,

image text in transcribed

.\

C Code bbb - Notepad File Edit Format View Help In [3] def mi_func(P): bfirst line 1 f-open(P, '' first f.readline() rest- f.readlines() rest = [l. Split(',') for i in rest] return first, rest 1,2,3,4,5,6,7,8 55,0,90,09,1,2,3, 8,9,7,6,8,7,6 3,43,5,8,2,4,1 - bvalues f.close [18] : afirst,avalues = mi.func('aaa.txt') bfirst,bvalues mi_func ('bbb.txt') In print (bvalues) ['1', "2', "3', '4', '5', 6', 7", 8In'], ['55 '], '776']] 1)why does it only print first line and 55 on bvalues? 2) how does it get 776? 3) how can i make it print bvalues properly

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

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions