Python: how to make if else for loops faster, when first value differs from any other?

Published: 12/06/2019
Python: how to make if else for loops faster, when first value differs from any other?
Source: STACKOVERFLOW.COM

I am dealing with a function that looks like this: def A(x): A=range(n) A[0]=(bx[0] if condition1 else cx[0]) for i in range(1,n): A[i]=((dx[i] if condition2 else ex[i]) return map(lambda x: x+3, A) where A is a list and b,c,d,e are operations that take x as variable. Basically, I need to make an if statement for the first value in the A-list, and a different if statement for any other value apart

Read more
Related news
Comment
FACEBOOK