Skip to content

Instantly share code, notes, and snippets.

@dimnikolos
Last active December 13, 2016 07:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimnikolos/38eeef71f01dc0084bd6f7e09a11ad7f to your computer and use it in GitHub Desktop.
Save dimnikolos/38eeef71f01dc0084bd6f7e09a11ad7f to your computer and use it in GitHub Desktop.
s = input().strip()
print(len([x for x in s if x.isupper()]) + (1 if not s[0].isupper() else 0))
@dimnikolos
Copy link
Author

Count words in camelCase string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment