在Python 中,可以使用循环来初始化二维列表。 例如,要创建一个3行4列的列表,可以这样: rows = 3 columns = 4 my_list = [[0 for j in range(columns)] for i in ...
確定! 回上一頁