[問題] translate的問題

看板Python作者 (popular)時間12年前 (2013/07/06 09:25), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/2 (看更多)
hi,我現在用的是python3.3 看了一本書example code,用來delete character 以下是範例: table=maketrans('cs','kz') "this is an incredible test".translate(table,' ') 想要再轉換character之後刪掉whitespace 可是python 的command line 顯示: translate() takes exactly one argument(2 given ) 是哪裡出了問題? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 111.253.177.1

07/06 17:34, , 1F
看help吧
07/06 17:34, 1F
文章代碼(AID): #1Hr-A5nW (Python)
討論串 (同標題文章)
以下文章回應了本文
完整討論串 (本文為第 1 之 2 篇):
文章代碼(AID): #1Hr-A5nW (Python)