Read the whole file as a string

Write a python program that accepts a string from user and perform following string operations – i) Calculate length of string ii) String reversal. ... file2.write(text)#writing the content to the file. text=file1.readline()#reading file line by line in a loop. file1.close() file2.close() def to_lower_case(file1): ................
................