Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

list_of_x_selected = [x for x,y in zip(list_of_x, list_of_y) if y>0]

map -  built-in method

Code Block
def f(x,y) :
    return x if y>0 else -x

list = map(f, arrX, arrY)

 

Polymorphism

Derived class initialization

...