Skip to content

Instantly share code, notes, and snippets.

@ChaitanyaBaweja
Last active December 22, 2018 15:21
Show Gist options
  • Save ChaitanyaBaweja/e645f9620701c5d287ff8da0fc813ad3 to your computer and use it in GitHub Desktop.
Save ChaitanyaBaweja/e645f9620701c5d287ff8da0fc813ad3 to your computer and use it in GitHub Desktop.
Applies function given by each element in L to x
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