f.f lush() < br / > f.s eek(0) < br / > the first you need to submit, second, You need to move the pointer to the beginning of the file
0 Answer
f.f lush() < br / > f.s eek(0) < br / > the first you need to submit, second, You need to move the pointer to the beginning of the file
First, you define the function, you don't call it
Second, your file open mode is set to r+, after writing the contents, the pointer is at the end of the file, you need f.sek(0), to put the pointer back
First, the problem with the first picture. You don't run the function
After writing, the pointer to the file stays at the end by default. To read the contents, you can adjust the pointer to the start position
这家伙很懒,什么都没留下...