Probably a simple question but I would like to parse the elements of one list individually to another. For example:
a=[5, 'str1']
b=[8, 'str2', a]
Currently
b=[8, 'str2', [5, 'str1']]
However I would like to be b=[8, 'str2', 5, 'str1']
and doing b=[8, 'str2', *a]
doesn't work either.
Use extend()
b.extend(a)
[8, 'str2', 5, 'str1']
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With