Computer Science, asked by viswa3047, 9 months ago

Write a method/function BIGLINES() in Python to read lines from a text file CONTENT.TXT, and display those lines, which are bigger than 20 characters.

Answers

Answered by gvlk1962
8

Answer:

Differentiate between the following:

f = open(‘diary.txt’, ‘r’)

f = open(‘diary.txt’, ‘w’)

diary.txt is opened for reading data.

diary.txt is opened for writing data.

Explanation:

Considering the following definition of class COMPANY, write a method in Python to search and display the content in a pickled file COMPANY.DAT, where CompID is matching with the value ‘1005’.

class Company:

def __init__(self,CID,NAM):

self.CompID = CID #CompID Company ID

self.CName = NAM #CName Company Name

self.Turnover = 1000

def Display(self):

print self.CompID,":",self.CName,":",self.Turnover

mark me as brainlist

Similar questions