我需要一個字符串傳遞給程序從猛砸CLI它的參數,如 program "don't do this"
字符串可以包括像'$'任何字符,'\',等等,我不想猛砸做任何修改。所以我想用單引號。 但是以下不工作: program 'don\'t do this' //escape doesn't work in single quote
雖然下面的兩件作品: program $'dont\'t
我在學習Python困難方式的exercise 8,我不明白爲什麼print函數中的某些行用單引號或雙引號打印。 程序如下: formatter = "%r %r %r %r"
print formatter % (
"I had this thing.",
"That you could type up right.",
"But it didn't sing.",
"So I sai