aboutsummaryrefslogtreecommitdiff
path: root/challenge-220/eric-cheung/python/ch-1.py
blob: 5ee515aea5b4547dfd452ef9caa8630bff4135fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
## arrWordList = ["Perl", "Rust", "Raku"]  ## Example 1
arrWordList = ["love", "live", "leave"]  ## Example 2

arrOutputList = []

for charLoop in arrWordList[0]:
    bExist = True
    for wordLoop in arrWordList[1:]:
        if not charLoop in wordLoop.lower():
            bExist = False
            break
    
    if bExist:
        arrOutputList.append(charLoop)

print (arrOutputList)