The teacher taught me very seriously, and the class is also vivid. This is Lesson 16th. Still lookCode:
Output parameter file('hello.txt ', 'R ')
# Output. Write ('/t you are a big/n apple ')
Read_output = output. readlines ()
Print read_output [2]
Output. Close ()
The above 'R' can be changed to 'W' and 'A' to indicate different meanings. Reading, writing, and appending are all from VB and C language. No need to say that, all understand, huh, let's continue.
Output parameter file('hello.txt ', 'R ')
# Output. Write ('/t you are a big/n apple ')
Read_output = output. Readline ()
Print read_output [2]
Output. Close ()
After the last letter S of readlines is removed, it can only display the first line of text. If you even remove line, that is: read_output = output. read, but the code below can be changed. Otherwise, you can only output one letter, and then you will not be able to laugh.