Code 17: Taking input in multiple lines for 1D Integer Array | Array Input Python | 365 days of code

Опубликовано: 30 Сентябрь 2024
на канале: Code House
391
4

Python program to take input in multiple lines for 1D Integer Array.

Complete playlist for different ways of input in the array as asked in coding questions:    • Array Input in Python  

Code -
"""
Input Format
N (Length of Array)
Value1
Value2
Value3
......

Sample Input:
4
83
84
85
86
"""
N = int(input()) # Length of Array
values = []
for i in range(N):
values.append(int(input()))
print(values)