file_name = “names.txt”
names = [“Jiro”, “Saburo”, “Shiro”]
with open(file_name, mode=”a”) as f:
for name in names:
f.write(f”{name}\n”)
file_name = “names.txt”
names = [“Jiro”, “Saburo”, “Shiro”]
with open(file_name, mode=”a”) as f:
for name in names:
f.write(f”{name}\n”)