python : combine multiple strip()

Viewed 27

I am reading a text from a serial connection using Python. I need to strip the result from different characters to get the relevant info. example:

    answer2 = answer1strip("\n")
    answer3 = answer2.strip("-")
    answer4 = answer3.strip()

is there a way to combine multiple .strip()

0 Answers
Related