Python how to delete lowercase words from a string that is in a list
Question: My question is: how do I delete all the lowercase words from a string that is
an element in a list? For example, if I have this list: `s = ["Johnny and
Annie.", "She and I."]`

what do I have to write to make python return `newlist = ["Johnny Annie", "She
I"]`

I've tried this, but it sadly doesn't work:

    
    
    def test(something):
        newlist = re.split("[.]", something)
        newlist = newlist.translate(None, string.ascii_lowercase)
        for e in newlist:
            e = e.translate(None, string.ascii_lowercase)
    


Answer: 
    >>> s = ["Johnny and Annie.", "She and I."]
    

You can check if the word is lowercase using `islower()` and using `split` to
iterate word by word.

    
    
    >>> [' '.join(word for word in i.split() if not word.islower()) for i in s]
    ['Johnny Annie.', 'She I.']
    

To remove punctuation as well

    
    
    >>> import string
    >>> [' '.join(word.strip(string.punctuation) for word in i.split() if not word.islower()) for i in s]
    ['Johnny Annie', 'She I']
    

