Python Programming - Console Input/Output - Discussion

Discussion Forum : Console Input/Output - General Questions (Q.No. 50)
50.
How can you read a list of comma-separated values from the console and convert them to integers?
input().split(',').to_int()
list(map(int, input().split(',')))
read_comma_separated_integers()
convert_to_int(input().split(','))
Answer: Option
Explanation:
To read a list of comma-separated values from the console and convert them to integers, use list(map(int, input().split(','))).
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.