Send
Close Add comments:
(status displays here)
Got it! This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website. nbsp; Note: This appears on each machine/browser from which this site is accessed.
Python list comprehensions
c
go
java
js
lua
py
vbs
rkt
scm
pro
1. Python list comprehensions
Create a list of the first 10 even numbers starting with 0 (zero) and then print out the list as a string all on one line.
2. Even number list
Here is the Python code.
Here is the output of the Python code.
Here is the Python code.
Here is the output of the Python code.
3. Concatenation
When converting lists into strings, do not use the concatenation operator "+ " (even though it works).
Instead, use the join method of the string data type (class).
4. End of page
5. Multiple choice questions for this page
1 questions omitted (login required)