Answered step by step
Verified Expert Solution
Question
1 Approved Answer
basic python why can i not print rest in the same way i can print first line? what do i need to do to make
basic python
why can i not print rest in the same way i can print first line?
what do i need to do to make it print rest?
In [1]: def open_function (b): f-open (b, 'r') for i in range (1): first-line-f.readline() #### ???? is this not right??? eturn first_line rest-f.readlines() return rest f.close bbb- Notepad File Edit Format View Help testbline 1 line 2 line 3 In [2]: open function ('bbb.txt') first_line-open_function ("bbb.txt') print(first_line) print (rest) this is the file test b line 1 Traceback (most rece NameError ipython-input-2-9da573f01c2b> i want to print rest in
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