Completed 4-6 Odd Numbers
This commit is contained in:
parent
8b919907a2
commit
cc757d2e34
7
4-6_oddNumbers.py
Normal file
7
4-6_oddNumbers.py
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Exercise 4-6 Odd Numbers
|
||||||
|
# Learning Objective: Use third argument of range() to produce list of odd #'s between 1 and 20.
|
||||||
|
|
||||||
|
oddNums = [value for value in range(1, 21, 2)]
|
||||||
|
print(oddNums)
|
||||||
|
|
||||||
|
#I'm sure this is probably a one-liner. Looking forward to that book.
|
||||||
Loading…
x
Reference in New Issue
Block a user