Question: python, printing a line from a file i need to open the file with a function ive made, i think ive got that, now i
python, printing a line from a file
i need to open the file with a function ive made, i think ive got that, now i want it to print just the first line

In [1 def open_function (b) f-open(b, 'r for i in range (1): bbb - Notepad File Edit Format View Help testbline 1 line 2 line 3 first-line-f.readline() #### ???? is this not right??? rest-f.readlines() f.close In [2]: open function ("bbb.txt') print(first_line) Traceback (most recent call last) NameError python-input-2-8c6b9aaf22ad in --> 1 open-function (bbb.txt)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
