diff options
Diffstat (limited to 'challenge-264/zapwai/python/ch-1.py')
| -rw-r--r-- | challenge-264/zapwai/python/ch-1.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/challenge-264/zapwai/python/ch-1.py b/challenge-264/zapwai/python/ch-1.py new file mode 100644 index 0000000000..809cb08ea2 --- /dev/null +++ b/challenge-264/zapwai/python/ch-1.py @@ -0,0 +1,20 @@ +def proc(str): + letters = list(str) + upper = [] + lower= [] + for l in letters: + if l.isupper(): + upper.append(l) + else: + lower.append(l) + common = [] + for u in upper: + for l in lower: + if u.lower() == l: + common.append(u) + common.sort() + return common[len(common)-1] + +str = 'PeRlwEKLy' +print("Input: str =", str) +print("Output:", proc(str)) |
