I have no idea why you want to do this but you can use the following bit of jQuery to achieve this.
var toBeId = "list_project01_";
var ulCtr = 0;
$("ul").each(function(){
if(ulCtr < 10){
$(this).prop("id", toBeId + "0" + ulCtr);
}
else{
$(this).prop("id", toBeId + ulCtr);
}
ulCtr++;
});
$("ul").each(function(){
var liCtr = 0;
$(this).children("li").each(function(){
var parentId = $(this).parent().prop("id");
if(liCtr < 10){
$(this).prop("id", parentId + "_0" + liCtr);
}
else{
$(this).prop("id", parentId + "_" + liCtr);
}
liCtr++;
});
});
Here's a working FIDDLE