+ 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'] ]
2 Answers
+ 1
Benjamin JĂŒrgens
But the desired output is one that's reshaped with 2 columns...
0
If you just print result instead of b it gives the desired output