Home > other >  Please help to solve this problem (python)
Please help to solve this problem (python)

Time:12-02

Three is your student id, name, and class to write a text file name. TXT, then the file name. TXT the contents of the output to the screen,

CodePudding user response:

https://www.cnblogs.com/zhxwind/p/8761618.html baidu next time

CodePudding user response:

Def (p) :
F=open (' books', 'r')
Print (f.r eadlines ())
F. lose ()

Def w () :
X=input (" student id ")
Y=input (" name ")
Z=input (" class ")
F=open (' books', 'w')
F.w rite (x + y "\ n" + "\ n" + z)
If memory serves

CodePudding user response:

Thank you for your advice
  • Related