...
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:
|
||||
import ast
|
||||
ans: str = ast.literal_eval("'''" + text.replace("'''", "'\\''") + "'''")
|
||||
from ast import literal_eval
|
||||
ans: str = literal_eval("'''" + text.replace("'''", "'\\''") + "'''")
|
||||
return ans
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user