Use split() function on input string to get input list of strings in Python. Where the split function splits a string into a list of words.
Example take input list of strings in Python
Simple example code accepts the list of strings from a user in the format of a string separated by space.
input_string = input("Enter name separated by space: ") # Split string into words lst = input_string.split(" ") print(lst)
Do comment if you have any doubts or suggestions on this Python input list topic.
Note: IDE: PyCharm 2021.3 (Community Edition)
All Python Examples are in Python 3, so Maybe its different from python 2 or upgraded versions.
Degree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology & like learning technical.