小编use*_*368的帖子

如何在数组+ PYTHON中输入?

嗨,我是python的新手,想要在数组中输入.关于数组没有很好地描述python doc.另外我觉得我对python中的for循环有一些打嗝.

我在python中提供了我想要的C代码片段:

C代码:

int i;

printf("Enter how many elements you want: ");
scanf("%d", &n);

printf("Enter the numbers in the array: ");
for (i = 0; i < n; i++)
    scanf("%d", &arr[i]);
Run Code Online (Sandbox Code Playgroud)

python

12
推荐指数
3
解决办法
17万
查看次数

标签 统计

python ×1