[問題]新手練習遇到問題

看板Python作者 (瑟夫李)時間11年前 (2014/03/14 17:13), 編輯推噓1(103)
留言4則, 2人參與, 最新討論串1/2 (看更多)
def merge3 ('''add something here '''): res = [] '''add something here''' return res mid = [33, 44, 88, 99, 22, 99, 77, 66, 55, 44, 33, 22, 88, 77, 66, 55] final = [13, 14, 18, 21, 13, 14, 18, 21, 37, 68, 16, 15, 14, 13, 13, 12] bonus = [3, 1, 1, 2, 3, 1, 1, 2, 3, 6, 1, 5, 4, 3, 1, 2] '''call the function and receive a list''' '''using a for-loop to print the results separated be \t''' 以下是輸出的結果↓ http://i.imgur.com/tRngRut.jpg
小弟在做function練習時,遇到了瓶頸...! 可否版上的大大幫我解答~~謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 60.250.65.17

03/14 17:23, , 1F
如果不是只想得到output的話 你要不要說一下問題點在哪
03/14 17:23, 1F

03/14 17:24, , 2F
是不會call函式 還是不會merge 還是不明白整個workflow的
03/14 17:24, 2F

03/14 17:24, , 3F
邏輯? (btw 縮排很重要...)
03/14 17:24, 3F

03/14 21:26, , 4F
zip
03/14 21:26, 4F
文章代碼(AID): #1J8iXDY_ (Python)
討論串 (同標題文章)
文章代碼(AID): #1J8iXDY_ (Python)