Back
a= [{'w', 'r', 't', 'y', 'e'}, {'f', 'g', 'w', 's', 'd'}]
How to change the above data set into a separate list so that
b = ['w', 'r', 't', 'y', 'e']c = ['f', 'g', 'w', 's', 'd']
b = ['w', 'r', 't', 'y', 'e']
c = ['f', 'g', 'w', 's', 'd']
Use the below code:
assert len(a) == 2b, c = [list(s) for s in a]
assert len(a) == 2
b, c = [list(s) for s in a]
If you want to know more about the Data Science then do check out the Data Science which will help you in understanding Data Science from scratch
31k questions
32.8k answers
501 comments
693 users