Deep wrote: > Hi all, > I am a newbie to python > I have an input of form > <one number> space <another number> > ie. > 4 3 > how can i assign these numbers to my variables?? >
Or with list comprehension: n1, n2 = [int(n) for n in raw_input().split()] Neither of these methods checks for errors (e.g. non-integers) -Larry -- http://mail.python.org/mailman/listinfo/python-list