its working for me i think its better to mention the value of i and j for both lists or you might have done mistake while formatting strings it should be %s for strings and %d for numbers if any subelement in lists does not formatted properly it may lead to error
-- http://mail.python.org/mailman/listinfo/python-list