for statement iterating through String characters

This commit is contained in:
Pawel Kowal 2017-02-07 16:01:21 +01:00
parent 4f7dd1e769
commit f7cfd22af4
1 changed files with 2 additions and 0 deletions

View File

@ -696,6 +696,8 @@ in the loop variable.
for i in range(2,8,2):
statement # similar to [2, 4, 6] but does not allocate an array
for c in "Hello":
print(c) # iterate through all characters in a String, print every letter on new line
match
^^^^^