[問題] +號代表

看板Python作者 (zzz...)時間8年前 (2017/09/15 23:32), 編輯推噓0(003)
留言3則, 3人參與, 最新討論串1/1
下面是telnetlib的例子其中一段, 想請問 user 和password後面的加號是代表甚麼意思呢? tn.read_until("login: ") tn.write(user + "\n") if password: tn.read_until("Password: ") tn.write(password + "\n") -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.249.96.46 ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1505489533.A.C1A.html

09/15 23:45, , 1F
字串的串接 在user/password後面加一個換行
09/15 23:45, 1F

09/16 00:12, , 2F
python的特色 +可當連接運算 *可當複製運算
09/16 00:12, 2F

09/24 15:19, , 3F
謝謝樓上兩位~~
09/24 15:19, 3F
文章代碼(AID): #1Pk_9zmQ (Python)