I think you would use a function and pass variables to it. So if the Laplace operator is a+b-c you could do something like
def laplace_func(a, b, c):
return a+b-c
#
if __name__ == '__main__':
laplace_list=[ [1 ,2 ,3],
[3, 2, 1],
[1, 3, 2]]
for eachlist in laplace_list:
result = laplace_func(eachlist[0], eachlist[1], eachlist[2])
print "result =", result, "for", eachlist
If this isn't even close to what you want, post some sample data and describe what you want to do with it
Reputation Points: 741
Solved Threads: 692
Nearly a Posting Maven
Offline 2,307 posts
since Dec 2006