fileiseitheratextorbytestringgivingthename(andthepathifthefileisn't in the current working directory) of the file to be opened or an integer file descriptor of the file to be wrapped. (If a file descriptor is given, it is closed when the returned I/O object is closed, unless closefd is set to False.)
CWH.write('李文:9本\N')
CWH.write('张伟:16本\N')
mode is an optional string that specifies the mode in which the file is opened. It defaults to 'r' which means open for