We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 560d0c4 commit 5d611b8Copy full SHA for 5d611b8
0010-For-Loops/for_loops.py
@@ -36,8 +36,22 @@
36
print(f"{COMMENT} - start")
37
print()
38
39
-for i in range(10):
40
- print(i) # Print 10 numbers starting from 0 (0-9)
+for char in "Hello":
+ print(char)
41
+
42
+print()
43
+print(f"{COMMENT} - finish")
44
+print("======================================================")
45
46
+COMMENT = "Iterating Over a Dictionary"
47
48
+print(f"{COMMENT} - start")
49
50
51
+PERSON = {"name": "John", "age": 25, "city": "New York"}
52
53
+for key, value in PERSON.items():
54
+ print(key, ":", value)
55
56
57
print(f"{COMMENT} - finish")
0 commit comments