aboutsummaryrefslogtreecommitdiff
path: root/challenge-034/paulo-custodio/python/ch-1.py
blob: d7855da4e7e64b35018390ff7e0fb7e93b82ce4d (plain)
1
2
3
4
5
6
7
8
9
10
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=", ")