+ 1

Python - In the code, how can we remove every ' list( ) ' in the output and only keep its content?

Code: https://code.sololearn.com/c1fJ9FbtPKoG/#py For example: input: a,b,c output: [[list([]) list(['a'])] [list(['b']) list(['a', 'b'])] [list(['c']) list(['a', 'c'])] [list(['b', 'c']) list(['a', 'b', 'c'])]] VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. Desired output: [ [], ['a'], ['b'], ['a', 'b'], ['c'], ['a', 'c'], ['b', 'c'], ['a', 'b', 'c'] ]

7th Nov 2020, 9:50 PM
Solus
Solus - avatar
2 Respuestas
+ 1
Benjamin Jürgens But the desired output is one that's reshaped with 2 columns...
8th Nov 2020, 12:39 AM
Solus
Solus - avatar
0
If you just print result instead of b it gives the desired output
7th Nov 2020, 10:32 PM
Benjamin Jürgens
Benjamin Jürgens - avatar