Write a function Show_words() in Python to read the content of a text file 'NOTES.TXT' and display only such lines of the file which have exactly 5 words in them.
Given a pickled file-log.dat, containing a list of strings. Write a python function that reads the file and looks for a line of the form
Error: 0.2395
whenever such line is encountered, extract the floating-point value and compute the total of these error values. When you reach the end of file print total number of such error lines and an average of an error value.
Which of the following is the default character for the newline parameter for a CSV file object opened in write mode in Python IDLE?
How is method write() different from writelines() in python?
Write statements in Python to perform the following operations:
To open a text "BOOK.TXT" in read mode
To open a text file "BOOK.TXT" in write mode
Write a method in Python to write multiple lines of text contents into a text file, 'myfile.txt'.
Write a method in Python to write multiple lines of text contents into a text file diary.txt.
Write a method in Python to read lines from a text file MYNOTES.TXT, and display those lines, which are starting with the alphabet K.
Considering the following definition of dictionary MULTIPLEX, where MULTIPLEX = {'MNO' : ________, 'MNAME' : ________, 'MTYPE' : ________}
Write a method in python to search and display all the content in a pickled file CINEMA.DAT, where MTYPE key of the dictionary is matching with the value 'Comedy'.
Differentiate between the following: