Question: Since my android phone does not connect via usb to my pc anymore (it just start charging), i would like to know if it is possible to install/debug apps (using Android Studio or Eclipse) via wifi (my device is NOT ROOTED). I have another phone (LGP690) that is configured to be a wifi hotspot. My PC and the other smartphone (an LG P880, the one with usb connection problem) are connected to it. Note that the LGP690 phone can be connected to my PC via usb.

Answer: 
`finally` is **always** executed. You are returning just fine, it is just that you misunderstood what the `finally` suite *does*.

From the [`try` statement documentation](https://docs.python.org/2/reference/compound_stmts.html#the-try-statement):

> 
> When a `return`, `break` or `continue` statement is executed in the `try` suite of a `try...finally` statement, the `finally` clause is also executed ‘on the way out.’ 
> 
> 
> 

In this context, the `except` and `else` handlers are part of the `try` suite still.

The `finally` suite is meant as a clean-up handler; once you enter the `try` suite, `finally` is guaranteed to be executed, no matter what happens. This can also mean you can alter what is returned. This is explicitly documented:

> 
> The return value of a function is determined by the last `return`
>  statement executed. Since the `finally` clause always executes, a `return`
>  statement executed in the `finally` clause will always be the last one
>  executed:
> 
> 
> 
> ```
> >>>
> >>> def foo():
> ...     try:
> ...         return 'try'
> ...     finally:
> ...         return 'finally'
> ...
> >>> foo()
> 'finally'
> 
> ```
> 
>
The finally statement is always executed in as per the try statement documentation. For your function you may wish to use an "else if"

```
def myfunc():
 try:
    a = 1
except:
    pass
elif: a == 1:
        return a
else:
        return 100

x = myfunc()
print(x)

```