How to input two numbers using space like [ 4<space>8] in two list type variables ?
Printable View
How to input two numbers using space like [ 4<space>8] in two list type variables ?
you should be more specific
input as in user input?
is [4 8] supposed to produce separate [4] and [8] or what?
perhaps the following code is what you're looking for (I assume that you use python 2.7.3):PHP Code:from string import split
list1, list2 = [[float(num)] for num in split(raw_input())]
print list1, list2