[問題] translate的問題
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
07/06 17:34, 1F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):