根據上例,以下範例會將巢狀列表也遍歷一遍,逐行顯示每個元素之值: for i in data: if isinstance(i, list): for j in i: print(j) else: print(i).
確定! 回上一頁