Maybe you have meant to a formatted string:
my_var3 = "prefix_%s" % suffix
Or
my_var3 = "prefix_{}".format(suffix)
where suffix has some runtime string result.
On Thursday, February 27, 2020, Gianluca Cecchi <gianluca.cecchi(a)gmail.com>
wrote:
Hello,
suppose in a .py using sdk I have
my_var1 = 'prefix'
then in the workflow I get at runtime another my_var2 that for example has
the attribute
my_var2.name that equals "suffix"
Then I want to define a new variable my_var3 with value "prefix_suffix",
where the string "suffix" is known only at runtime, how can I get it?
my_var3 = ???
Can I use something similar to what I do when using the print function?
print ("My storage domain is %s..." % sd.name)
?
Thanks,
Gianluca