aboutsummaryrefslogtreecommitdiff
path: root/challenge-331/luca-ferrari/python/ch-1.py
blob: e3b753d6238cf154962863be388dcb6855595a12 (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
#!python

#
# Perl Weekly Challenge 331
# Task 1
#
# See <https://perlweeklychallenge.org/blog/perl-weekly-challenge-331>
#

import sys

# task implementation
# the return value will be printed
def task_1( args ):
    size = 0
    for w in args[ 0 ].split() :
        if len( w ) > 0 :
            size = len( w )

    return size


# invoke the main without the command itself
if __name__ == '__main__':
    print( task_1( sys.argv[ 1: ] ) )