diff options
Diffstat (limited to 'challenge-034/paulo-custodio/python/ch-1.py')
| -rw-r--r-- | challenge-034/paulo-custodio/python/ch-1.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/challenge-034/paulo-custodio/python/ch-1.py b/challenge-034/paulo-custodio/python/ch-1.py new file mode 100644 index 0000000000..d7855da4e7 --- /dev/null +++ b/challenge-034/paulo-custodio/python/ch-1.py @@ -0,0 +1,11 @@ +#!/usr/bin/python3 + +# Challenge 034 +# +# Task #1 +# Contributed by Dave Cross +# Write a program that demonstrates using hash slices and/or array slices. + +data = {'oranges':3, 'pears':2, 'apples':4} +values = [data[x] for x in 'oranges apples'.split()] +print(*values, sep=", ") |
