scanf string in python
news at yebu.de
Fri Jul 18 09:21:59 CEST 2003
> lehrig wrote:
>>I have a string which is returned by a C extension.
>>mystring = '(1,2,3)'
>>HOW can I read the numbers in python ?
> Now I have done it like this:
> tmp = mystring[1:-1]
> tmplist = string.split(tmp,',')
> x = int(tmplist)
> y = int(tmplist)
> z = int(tmplist)
> But there should be a more convenient solution.
would be shorter
More information about the Python-list