[Solved] Str object has no attribute “add”
You assigned a string to the operator name: operator = randomOp[0] You are now masking the operator module. Don’t re-use names like that, because the next iteration of your for loop operator.add now tries to look up the add attribute on that string (so one of ‘+’, ‘-‘ or ‘*’, whatever the first iteration picked … Read more