class transaction:
...
def send(from_key, to_key, SN):
if SN in from_key.parts:
str(from_key)+str(to_key)+str(SN)=transaction(SN,from_key,to_key,True)
SyntaxError: can not assign to operator
I can not assign a int
to the "transaction" class ...
Let's assume that
from_key = a
to_key = b
SN = 123
I want to get the following result:
ab123 = transaction(SN,from_key,to_key,True)
Manually (out of function), it works, but when I try to automate the function I get this error.
Update:
I need to give a name to a class (transaction) and determined that this name will be my from_key + to_key + SN
, in my example it would be ab123
.
The problem is that each time I make a transaction this name will change, and I created a function to perform this assing alone ( ab123 = transaction(...)
).
How can I make this work?