-1
我試圖讓裏面做這樣的功能:String作爲函數的輸入 - Python的
輸出:aq
所以,定義我的功能,我這樣做:
def con(p):
print "a" + "p"
測試我funcion:con(i)
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-91-ed8318952c9a> in <module>()
2 print "a" + "p"
3
----> 4 con(i)
5
NameError: name 'i' is not defined
我的預期輸出爲AI
我忘了,但它並沒有anymay正常,則檢查MI後期編輯。 – CreamStat
@CreamStat請檢查最新的答案。 – thefourtheye
使用該定義,輸出對於任何文本字符串都是ap – CreamStat