#input
my_string = \'abcdefgABCDEFGHIJKLMNOP\'
how would one extract all the UPPER from a string?
#output
my_upper = \'ABCDEFGHIJKL
Higher order functions to the rescue!
filter(str.isupper, "abcdefgABCDEFGHIJKLMNOP")
EDIT: In case you don't know what filter does: filter takes a function and an iterable, and then applies the function to every element in the iterable. It keeps all of the values that return true and throws out all of the rest. Therefore, this will return "ABCDEFGHIJKLMNOP".