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

preview_player
Показать описание
Python program to take input in a line for 1D Array.

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.
Рекомендации по теме
Комментарии
Автор

Didn't know about this technique, thanks for sharing!

reetikagautam