# -*- coding: utf-8 -*-
"""Convert each words capital in string."""
from __future__ import print_function
from argparse import ArgumentParser
def convert_each_word_capital(s):
"""Convert each words capital in string."""
words = s.split(" ")
capitaled_words = map(lambda x: x.capitalize(), words)
return ' '.join(capitaled_words)
def main():
"""Main."""
parser = ArgumentParser()
parser.add_argument('strings', metavar="S", type=str,
nargs='+')
args = parser.parse_args()
for arg in args.strings:
print("---")
print("Before: {}".format(arg))
result = convert_each_word_capital(arg)
print("After: {}".format(result))
if __name__ == "__main__":
main()