This commit is contained in:
2022-11-23 18:10:46 +01:00
parent b8d72c3bc3
commit b8dec3a77d
11 changed files with 179 additions and 4 deletions

13
Mittwoch/write_file.py Normal file
View File

@@ -0,0 +1,13 @@
#! /usr/bin/env python3
def write_into_files(path, lines):
with open(path, 'w') as outfile:
for line in lines:
print(line, file=outfile)
pass
lines = ["Das ist ein zeichen", "Das ist ein zweites zeichen0000"]
lines.append("Next line")
write_into_files("/tmp/test.txt", lines)