We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6acf027 commit cfb50f8Copy full SHA for cfb50f8
1 file changed
Level4.py
@@ -0,0 +1,23 @@
1
+>>> import os
2
+
3
+#Existiert eine Datei?
4
5
+>>> os.path.exists("Beispiele/lorem_ipsum.txt")
6
+False
7
+>>> os.path.exists("Beispiele/loremipsum.txt")
8
+True
9
10
+#einen Ordner erstellen
11
12
+>>> os.mkdir("/tmp/nkhsekgs")
13
14
+#eine Datei auslesen
15
16
+>>> lorem_ipsum = open("loremipsum.txt", "r")
17
+>>> print(lorem_ipsum.read())
18
19
+#eine Datei schreiben
20
21
+>>> test = open("test.txt", "w")
22
+>>> test.write("total toller Text")
23
+17
0 commit comments