Find the last element of the given argument(s).

## Examples

```python
last([1, 2, 3, 4]) ==>  4
last("xyz")        ==> "z"
last(1, 2, 3, 4)   ==>  4
```
In **javascript** and **CoffeeScript** a **list** will be an `array`, a `string` or the list of `arguments`.

(courtesy of [haskell.org](http://www.haskell.org/haskellwiki/99_questions/1_to_10))

Difficulty: introductory

Starter code:

def last(*args):
	

Solutions:
def last(*args):
    return args[-1] if not hasattr(args[-1], "__getitem__") else args[-1][-1]

def last(*args): 
    try:
        return args[-1][-1]
    except:
        return args[-1]

def last(*x):
    try:
        return x[-1][-1]
    except TypeError:
        return x[-1]

def last(*arr):        
    return arr[-1] if type(arr[-1]) == int else arr[-1][-1]

from collections import Iterable

def last(*args):
    return args[-1][-1] if isinstance(args[-1], Iterable) else args[-1]

last=lambda *l:isinstance(l[-1], int)and l[-1]or l[-1][-1]

def last(*args):
    try:
        count = len(args[-1])
        return args[-1][-1]
    except TypeError:
        return args[-1]

last = lambda *l: l[-1] if len(l)!=1 or not hasattr(l[0], "__getitem__") else l[0][-1]

def last(*args):
    last = args[-1]
    try:
        return last[-1]
    except TypeError:
        return last

def last(*args):
    import collections
    if len(args) == 1:
        if isinstance(args[0], collections.Iterable):
            return args[0][-1]
        else:
            return args[0]
    else:
        return args[-1]