diff options
Diffstat (limited to 'challenge-240/sgreen/python/ch-1.py')
| -rwxr-xr-x | challenge-240/sgreen/python/ch-1.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/challenge-240/sgreen/python/ch-1.py b/challenge-240/sgreen/python/ch-1.py new file mode 100755 index 0000000000..7f4a6e8caa --- /dev/null +++ b/challenge-240/sgreen/python/ch-1.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +import sys + + +def main(words, acronym): + # Calculate the first letters from the words + first_letters = ''.join(map(lambda w: w[0], words)) + print('true' if first_letters.lower() == acronym.lower() else 'false') + + +if __name__ == '__main__': + # The last value is the 'acronym' + acronym = sys.argv.pop() + main(sys.argv[1:], acronym) |
