aboutsummaryrefslogtreecommitdiff
path: root/challenge-040/paulo-custodio/python/ch-1.py
blob: 5975a7c9d448a16bd58756157c118bbdf21a0cf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python3

# Challenge 040
#
# TASK #1
# Show multiple arrays content
# You are given two or more arrays. Write a script to display values of each
# list at a given index.
#
# For example:
#
# Array 1: [ I L O V E Y O U ]
# Array 2: [ 2 4 0 3 2 0 1 9 ]
# Array 3: [ ! ? @ $ % ^ & * ]
# We expect the following output:
#
# I 2 !
# L 4 ?
# O 0 @
# V 3 $
# E 2 %
# Y 0 ^
# O 1 &
# U 9 *

def show_multiple(data):
    for j in range(0, len(data[0])):
        for i in range(0, len(data)):
            print(data[i][j], end=" ")
        print("")

show_multiple([['I', 'L', 'O', 'V', 'E', 'Y', 'O', 'U'],
               ['2', '4', '0', '3', '2', '0', '1', '9'],
               ['!', '?', '@', '$', '%', '^', '&', '*']])