This sounds simple but how can i display the capital letters of a string like:
string = "Hey There"
Then displays
'HT'
Try this
''.join([word[0] for word in s.split() if word[0].isupper()])
s
being the string you want to find the capital letters, you split the string into words and choose those which have a upper case first letter.
In case you want all the capital letters off the string
''.join(c for c in s if c.isupper())
In this we check if every character c
is upper case and join all such characters.