...
This commit is contained in:
parent
10d359c222
commit
86a8b231f4
@ -96,8 +96,8 @@ def to_cmdline(x: str) -> List[str]:
|
|||||||
|
|
||||||
|
|
||||||
def python_string(text: str) -> str:
|
def python_string(text: str) -> str:
|
||||||
import ast
|
from ast import literal_eval
|
||||||
ans: str = ast.literal_eval("'''" + text.replace("'''", "'\\''") + "'''")
|
ans: str = literal_eval("'''" + text.replace("'''", "'\\''") + "'''")
|
||||||
return ans
|
return ans
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user