Oct-30-2018, 08:41 PM
A bit different way:
>>> '[1, 2]'.strip('[]').split(',') ['1', ' 2'] >>>
String to list
|
|
Messages In This Thread |
String to list - by digysol - Oct-30-2018, 07:17 PM
RE: String to list - by ichabod801 - Oct-30-2018, 07:31 PM
RE: String to list - by wavic - Oct-30-2018, 08:41 PM
RE: String to list - by woooee - Oct-30-2018, 09:08 PM
RE: String to list - by Gribouillis - Oct-31-2018, 07:56 AM
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
I converted string to 'list', but it doesn't look like a list! | mrapple2020 | 3 | 3,341 |
Apr-07-2019, 02:34 PM Last Post: mrapple2020 |
|
Create Alert if string from list appears on other list | javalava | 1 | 2,575 |
Sep-17-2018, 02:44 PM Last Post: DeaD_EyE |
|
List of pathlib.Paths Not Ordered As Same List of Same String Filenames | QbLearningPython | 20 | 15,824 |
Nov-16-2017, 04:47 PM Last Post: QbLearningPython |
|
Create a new list by comparing values in a list and string | DBS | 2 | 3,618 |
Jan-14-2017, 07:59 AM Last Post: Yoriz |