Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def capital_indexes(test_str):
- res = [idx for idx in range(len(test_str)) if test_str[idx].isupper()]
- return str(res)
- print(capital_indexes('HI'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement