0

I am trying to remove the brackets and the single quotation marks from a IPython.utils.text.SList. I have tried stripping the list, but it says that SList doesn't have these capabilities. It would be great if someone could explain to me the difference between a SList and a regular list too.

[['CNC'],['CN'],['COOH'],['NNN'], ['CCCC']]

to

[CNC,CN,COOH,NNN,CCCC]

Yumbo
  • 5
  • 5
  • You have a list of strings. You cannot remove the quotes. Calling `.l` on an SList will give the list itself. https://ipython.readthedocs.io/en/stable/api/generated/IPython.utils.text.html#IPython.utils.text.SList – OneCricketeer Nov 30 '21 at 20:31
  • In part, you are confusing the REPRESENTATION of your data with the CONTENTS of your data. It prints like that because that's how Python prints strings, but those quote marks are not part of the data. – Tim Roberts Nov 30 '21 at 20:31

0 Answers0