If I have variables x and y , such that:
x always a stringy can be either a string or a list of strings
How to create a list z == [x, <all elements of y>] ?
For instance:
x = 'x' y = 'y' # create z assert z == ['x', 'y']
x = 'x' y = ['y', 'y2'] # create z assert z == ['x', 'y', 'y2']
source share