Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/306.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
防止IPython显示每行一个元素的长列表_Python_Jupyter Notebook_Ipython - Fatal编程技术网

防止IPython显示每行一个元素的长列表

防止IPython显示每行一个元素的长列表,python,jupyter-notebook,ipython,Python,Jupyter Notebook,Ipython,在Jupyter笔记本或IPython中,长列表每行显示一个元素。如何在单行上显示它们?我不介意电话线是否接通 在下面的示例中,我希望第三个列表显示为“行”,而不是“列” 我正在寻找的输出如下或类似: [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,

在Jupyter笔记本或IPython中,长列表每行显示一个元素。如何在单行上显示它们?我不介意电话线是否接通

在下面的示例中,我希望第三个列表显示为“行”,而不是“列”

我正在寻找的输出如下或类似:

[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19],
 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]]
我的目标是使输出更容易为人类阅读。

我只需使用

A = [list(range(n)) for n in range(10,40,10)]

for i in A:
    print(i)
A = [list(range(n)) for n in range(10,40,10)]

for i in A:
    print(i)