Created
August 9, 2015 21:16
-
-
Save Maslor/7f37941090332281fd25 to your computer and use it in GitHub Desktop.
Lists a String's capital letters' index
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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