combine class with reference

Hello,
I am trying to refernce in constant CHOP new1 to the chan1 of the constant CHOP “constant1”. What of cause works nicely is:
op(‘‘constant1’) [‘chan1’]
Instead of writing “1” after “constant” I want to get the “1” from grabbing to the digit of my new1. I tried following but failed:
op(’‘constant’+me.digits’) [‘chan1’]

I am still new to python and also I didnt find anything about it in the TD help.

Looks like you don’t have matching quotes, and me.digits needs to be converted to a string:

op(‘constant’+str(me.digits)) [‘chan1’]

The TD help wouldn’t cover the intro to Python, except as it relates to TD, though the article points to some general python links you may find useful:

docs.derivative.ca/Introduction_to_Python

Cheers,
Rob.

Thanks a lot, Rob! If I add the missing “)” it works perfect…

Thanks, edited!