How many characters would be in each line printed by this code, if one character is one byte? file = open("filename.txt", "r") for i in range(21): print(file.read(4)) file.close()
4/29/2020 2:59:17 PM
Arpita Chakraborty12 Answers
New AnswerThe answer is 4 Although the statement 'print(file.read(4))' is executing 21 iterations, each iteration It will read the same 4 characters.
Learn Playing. Play Learning
SoloLearn Inc.
4 Embarcadero Center, Suite 1455Send us a message