how to delete lowercase words from a string in python

Posted by gaggina on Stack Overflow See other posts from Stack Overflow or by gaggina
Published on 2011-11-30T13:40:14Z Indexed on 2011/12/01 1:53 UTC
Read the original article Hit count: 240

Filed under:
|

I'm new in python and I'm having some issues doing a simple thing.

I've an array (or list as it's said in pyton) like this:

 list = [ 'NICE dog' , 'blue FLOWER' , 'GOOD cat' , 'YELLOW caw']

As you see each element of this array contains some words. These words is both lowercase and uppercase.

How I can delete from this array each lowercase words?

For example I'd like to have as result this list:

list = [ 'NICE' , 'FLOWER' , 'GOOD' , 'YELLOW']

© Stack Overflow or respective owner

Related posts about python

Related posts about list