Have got a set() like
item = {'Apple','Lemon'}
and a string flow='Mango'
need to combine both to form a list like below
result = ['Mango','Apple','Lemon']
tried the code result = [flow ,item] which doesn’t work out.
Help me through this. Thanks!
>Solution :
You can unpack the set into a new list that includes flow:
result = [flow, *item]