How do you convert a string into a list?
Say the string is like text = \"a,b,c\". After the conversion, text == [\'a\', \'b\', \'c\'] and h
text = \"a,b,c\"
text == [\'a\', \'b\', \'c\']
# to strip `,` and `.` from a string -> >>> 'a,b,c.'.translate(None, ',.') 'abc'
You should use the built-in translate method for strings.
translate
Type help('abc'.translate) at Python shell for more info.
help('abc'.translate)