Use Code tags
The problem is this,is not converting into tuple.
The problem is this,is not converting into tuple.
>>> f_result= ','.join(str(s)) >>> f_result 'h,e,l,l,o, ,w,o,r,l,d'Bye your output so is input comma separated.
1065, Street Level 4Test,i make input like over each on new line.
with open('test.txt') as f, open('test_file.txt', 'w') as wf: for line in f: line = line.strip().replace(', ', '\n') wf.write(f'{line}\n') wf.write('----------\n')
Output:hello
world
----------
1065
Street Level 4
----------
car
12456
----------