How to replace empty string with zero in comma-separated string?

Posted by dsaccount1 on Stack Overflow See other posts from Stack Overflow or by dsaccount1
Published on 2010-04-09T11:29:06Z Indexed on 2010/04/09 11:43 UTC
Read the original article Hit count: 292

"8,5,,1,4,7,,,,7,,1,9,3,6,,,8,6,3,9,,2,5,4,,,,,3,2,,,7,4,1,1,,4,,6,9,,5,,,,5,,,1,,6,3,,,6,5,,,,7,4,,1,7,6,,,,8,,5,,,7,1,,3,9,"

I'm doing a programming challenge where i need to parse this sequence into my sudoku script. Need to get the above sequence into 8,5,0,1,4,7,0,0,0,7,0,1,9,3,6,0,0,8......... I tried re but without success, help is appreciated, thanks.

© Stack Overflow or respective owner

Related posts about python

Related posts about string-manipulation