以下は私が試したコードです。私はpythonが初めてです。誰かが私に何をすべきか教えてもらえますか
#opening a 'Newfile' to write in
file_list=open('file_list.txt','w')
#taking the list of file which i have to write in file
list_files = os.system("ls -1 /amxusers7/inf/aimsys/netabp6/ALL_SCRIPTS/VOICE")
#trying to write in a Newfile
file_list.writelines(list_files)
エラーが発生しています:
Traceback (most recent call last):
File "testPuneet.py", line 30, in ?
file_list.writelines(list_files)
TypeError: writelines() requires an iterable argument