That's because @Anonymous User points out, you need to pass the full filepath:
with open(os.path.join(inPut, out), "w") as k:
k.write('Hellow')
Note, the above will overwrite your original files. If you want to append to the existing files, use the 'a' argument to open:
with open(os.path.join(inPut, out), "a") as k:
k.write('Hellow')