Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Cjupyter Untitled27 Last Checkpoint: 2 hours ago (unsaved chang- aaa Notepad File Edit Format View Help est a line 1 line 2 line 3 File

image text in transcribed

Cjupyter Untitled27 Last Checkpoint: 2 hours ago (unsaved chang- aaa Notepad File Edit Format View Help est a line 1 line 2 line 3 File Edit View nsert Cell Kenel Widgets Help a rest In [11: def open function (P): open (P, 'r') first_line-f.readline() rest = f.readlines() return first line, rest f.close In [3]: first_line, rest-open_function('bbb.txt') rest-b rest first_line, rest-open_function( 'aaa.txt') rest-a rest print (a_rest) print (b rest) bbb - Notepad File Edit Format View Help NameError ipython-input-3-8e6377ebaa79 line 2 line 3 in module() 1 first_line, rest-open_function ("bbb.txt') b rest line 4 - 2 rest-b_rest 4 first_line, rest-open_function('aaa.txt) 5 rest-a rest NameError: name 'b_rest' is not defined O Type here to search i would like to print a rest and b rest at will by just typing print(a _rest) how can i do this

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions

Question

20:17 SO

Answered: 1 week ago

Question

Excel caculation on cascade mental health clinic

Answered: 1 week ago