Say : line = abcdabcd#12 adssda
index = line.find('#')
num = line[index:index+2]
num will now be 12.
Likewise I want to read the number after the '#' and store it in num. The
problem is that the number can be a 1/2/3/4 digit number. So is there a way in
which I can define num so that it contains the number after '#' irrespective of
how many digits the number is. Because the problem is that the above code will
not work for scenarios when the number is not 2 digits..
Thanks,
Pratik
--
http://mail.python.org/mailman/listinfo/python-list