Lets say I have 3 objects:
object1 = [1, 2, 3]
object2 = 'string'
object3 = {'key': 10}
I am trying to create a new list object in one line such that it looks like this:
object4 = [1, 2, 3, 'string', {'key': 10}]
>Solution :
you can use unpacking for the iterables:
object4 = [*object1,object2,object3]