[英]print a 2d array in python
I trained to write a 2d array and then I dont know how to complete , pls help me here is the code (it's simple) :我训练写了一个二维数组,然后我不知道如何完成,请帮助我这里是代码(很简单):
family = [
['zak','mikle','lion','sonia','Richard'],
[14 , 12 , 11 , 47 , 48],
['moh','pr','el noob','lala','pa'],
['deep','lovly','noob','kind','smart'],
],
print(family[1][1])
and here is the problem :这是问题所在:
Get rid of the extra comma after the end of your array:在数组结束后去掉多余的逗号:
family = [
['zak','mikle','lion','sonia','Richard'],
[14 , 12 , 11 , 47 , 48],
['moh','pr','el noob','lala','pa'],
['deep','lovly','noob','kind','smart'],
]
print(family[1][1])
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.