Last active
December 22, 2018 15:21
-
-
Save ChaitanyaBaweja/e645f9620701c5d287ff8da0fc813ad3 to your computer and use it in GitHub Desktop.
Applies function given by each element in L to x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import exp | |
def apply_func(L,x): | |
""" | |
Applies function given by each element in L to x | |
Parameters | |
---------- | |
L : list containing the operations | |
x : the operand | |
Returns | |
------- | |
result: resulting list | |
""" | |
result = [] | |
for f in L: | |
result.append(f(x)) | |
return result | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment