Code 14: Taking input in one line for 1D Array in Python | Array Input Python | 365 days of code

Опубликовано: 11 Октябрь 2024
на канале: Code House
700
8

Python program to take input in a line for 1D Array.

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

Code -
N = int(input()) # Length of Array (But we will not use it)
values = input().strip().split()
print(values)
So, we have no use of N because we splitted the complete string.