I am trying to write a basic file writing syntax inside a function but it doesn't work. The file is never created. When i do it outside function, it works fine. I am not sure what I am doing wrong. Kindly point me in the right direction
def write():
file=open("testfle.txt","w")
file.write('hello')
file.close()
return