Question: I have a list:

```
lst = [a,b,c,d,e...]

```

and math formula :

```
x = b/(b/a+b/c+b/d+b/e...+1)

```

I do not know in advance how many members(numbers) have list.
How to create a formula in relation to the length of the list?

Example:

```
lst = [12,23,45,65,78]
x = 23/(23/12+23/45+23/65+23/78+1)

```

Answer: 
As a function

```
def equation(l):
    b = float(l[1])    # this avoids int division
    return b / sum([b/i for i in l])

```

Testing

```
>>> equation([1,2,3,4,5])
0.43795620437956206
>>> lst = [12,23,45,65,78]
>>> equation(lst)
5.642100849145612

```
sipmly you can use `in` operator ! and dont need to length of list ! 

```
x=[list[1]/sum(([(list[1]/i) for i in list])

```

anyway you can access to length of list by [`len()`](https://docs.python.org/2/library/functions.html#len) function !