Last active
March 14, 2020 08:25
-
-
Save Hayyhayy/bbdb055be54fa83c155aec1881bac139 to your computer and use it in GitHub Desktop.
1. In python terms, the variable friends is a list of three strings,
2. the for loop goes through the list and executes the body once for each of the three strings in the list resulting in thiis output.
3. **for** and **in** are reserved Python keywo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| n = 10 | |
| while True: | |
| Print(n, end=' ') | |
| n = n - 1 | |
| print('Done!') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| friends = ['Joseph', 'Glen', 'Sally'] | |
| for friend in friends: | |
| print('Happy New Year:', friend) | |
| print('Done!') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment