August 2021
Beginner to intermediate
118 pages
1h 29m
English
| Puzzle 25 | Look at the Pretty Colors |
| | colors = [ |
| | 'red', |
| | 'green' |
| | 'blue' |
| | ] |
| | |
| | print(colors) |
Guess the Output | |
|---|---|
|
|
Try to guess what the output is before moving to the next page. |
This code will print: [’red’, ’greenblue’]
Python’s use of white space is pretty unique in programming languages. Some people don’t like it. I personally find it makes the code more readable.
The Python documentation says
A logical line is constructed from ...
Read now
Unlock full access