Is there a single line command to add two strings contained in a tuple to two existing strings in a program?
This is essentially what I want to do but in a shorter way,
t=("hi","hello")
x="test"
y="python"
x+=t[0]
y+=t[1]
I was thinking maybe there is a code like this that actually works,
x+,y+=t
Using python's in place addition with unpacked tuples - I really liked the complex number solution given in this similar question, but I cannot use it since my values are strings. Or is there a way I can manipulate my data (without going into too many lines of code) so that this method can be used?