Skip to content

Instantly share code, notes, and snippets.

@Maslor
Created August 9, 2015 21:16
Show Gist options
  • Save Maslor/7f37941090332281fd25 to your computer and use it in GitHub Desktop.
Save Maslor/7f37941090332281fd25 to your computer and use it in GitHub Desktop.
Lists a String's capital letters' index
def capitals(word):
lst = []
for i,ch in enumerate(word):
if ch.isupper():
lst.append(i)
return lst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment