Converting string to tuple without splitting characters

后端 未结 9 1179
逝去的感伤
逝去的感伤 2020-12-02 19:49

I am striving to convert a string to a tuple without splitting the characters of the string in the process. Can somebody suggest an easy method to do this. Need a one liner.

9条回答
  •  心在旅途
    2020-12-02 20:35

    Just in case someone comes here trying to know how to create a tuple assigning each part of the string "Quattro" and "TT" to an element of the list, it would be like this print tuple(a.split())

提交回复
热议问题