Answers for "read input with multiple lines to list"

5

multiline input in python

print("Enter the array:n")   
userInput = input().splitlines()
print(userInput)
Posted by: Guest on August-13-2020
0

how to take input for list in one line in python

# Reads two numbers from input and typecasts them to int using 
# list comprehension 
x, y = [int(x) for x in input().split()]
Posted by: Guest on March-07-2021

Code answers related to "read input with multiple lines to list"

Python Answers by Framework

Browse Popular Code Answers by Language