How can i make array of data from user input | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can i make array of data from user input

Suppose i want to make array of names and those names are coming from user Eg names=[collection of names here]

10th Apr 2019, 10:17 AM
Jafari Ibrahim
Jafari Ibrahim - avatar
1 Answer
+ 12
With python it will work like this: names = input().split() If user enters a succesion of white space separated names, the result will be a list containing these names.
10th Apr 2019, 11:58 AM
Cépagrave
Cépagrave - avatar