I edited python script like below.
def func(file_obj)
str="test"
file_obj.write(str)
def main():
f=open("test.txt", 'w')
func(f)
f.close()
if __name__=='__main__':
main()
And then error happened like below.
File "test.py", line 2
def func(file_obj)
^
SyntaxError: invalid syntax
How to pass file object as function parameter?