How to input two numbers using space like [ 4<space>8] in two list type variables ?
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?
if you get a satisfactory answer to your problem, mark the thread as [SOLVED]. Thanks (How-to)
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
Last edited by iMac71; March 7th, 2013 at 06:05 PM.
Bookmarks