aboutsummaryrefslogtreecommitdiff
path: root/challenge-225/sgreen/python/ch-1.py
blob: 0f7f0502ce8cd7a6ffc4074776ce1491b75c847a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env python3

import sys


def main(sentences):
    # Count the number of spaces + 1
    words = [x.count(' ')+1 for x in sentences]

    # Display the maximum number of words
    print(max(words))


if __name__ == '__main__':
    main(sys.argv[1:])