Make it a dictionary,that's what python dos internally anyway.
So a dictionary that is visible.
>>> y = '1' >>> x = 'hello'+y # Stored as dictionary,but x has now reference to y >>> globals() {'y': '1', 'x': 'hello1'}As mention bye volcano63 so get reference to
y
lost when concatenate with "hello".So a dictionary that is visible.
>>> y = '1' >>> d = {'hello': y} >>> d {'hello': '1'} >>> vaule = ''.join(d.items()[0]) >>> vaule 'hello1' >>> y = '2' >>> d['hello'] = y >>> d {'hello': '2'} >>> new_vaule = ''.join(d.items()[0]) >>> new_vaule 'hello2'