Single Choice
Not Set
QTo read two bytes from a file object infile, we use ____________
ID: #3655
Python File Handling
282 views
Question Info
#3655Q ID
Not SetDifficulty
Python File HandlingTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
read () function reads at most n bytes and returns the read bytes as string.
Syntax.read [[n]] read ( [n] )
to read two character, so n = 2 and file name infile
infile.read (2)
Syntax
to read two character, so n = 2 and file name infile
infile.read (2)
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic