The aim of this Kata is to write a function which will reverse the case of all consecutive duplicate letters in a string.  That is, any letters that occur one after the other and are identical.
If the duplicate letters are lowercase then they must be set to uppercase, and if they are uppercase then they need to be changed to lowercase. 
**Examples:**
```python
reverse_case("puzzles")    Expected Result: "puZZles"
reverse_case("massive")    Expected Result: "maSSive"
reverse_case("LITTLE")     Expected Result: "LIttLE"
reverse_case("shhh")       Expected Result: "sHHH"
```
Arguments passed will include only alphabetical letters A–Z or a–z.
from itertools import groupby
def reverse(str):
    reversal=""
    for k,g in groupby(str):
        l=list(g)
        if len(l)>1:reversal+=''.join(l).swapcase()
        else:reversal+=k
    return reversal
from itertools import groupby
def reverse(str):
    reversal=""
    for k,g in groupby(str):
        l=list(g)
        if len(l)>1:reversal+=''.join(l).swapcase()
        else:reversal+=k
    return reversal