Question: I'm working on Python 2.7 and regular expressions. So my question is: how can I select the words with all the letters are uppercase from a .txt file? For example my txt file: 

> 
> PYTHON 111 Python I - blabla. JAVA 222 Physics II - blalba..
> 
> 
> 

I want an output like "PYTHON, JAVA".
Also I don't want one letter words in my output.

Answer: 
You don't need regular expressions. Of course if you like them, they can work, but python provides a simpler way:

```
>>> words = "PYTHON 111 Python I - blabla. JAVA 222 APPhysics II - blalba.."
>>> for word in words.split():
...   if word.isalpha() and word.isupper() and len(word) > 1:
...       print word
... 
PYTHON
JAVA
II

```
```
>>> s="PYTHON 111 Python I - blabla. JAVA 222 APPhysics II - blalba.."
>>> re.findall(r"\b[A-Z]{2,}\b", s)
['PYTHON', 'JAVA', 'II']

```