...
This commit is contained in:
parent
10d359c222
commit
86a8b231f4
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Reference in a new issue