看板 Python 關於我們 聯絡資訊
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
tiefblau:如果不是只想得到output的話 你要不要說一下問題點在哪 03/14 17:23
tiefblau:是不會call函式 還是不會merge 還是不明白整個workflow的 03/14 17:24
tiefblau:邏輯? (btw 縮排很重要...) 03/14 17:24
tjjh89017:zip 03/14 21:26