We can convert string into integer e.g.
>>> s = "07123456789"
>>> "44%s"%(int(s))
'447123456789'
We can use lstrip method of string which will remove all "0" from left of string. e.g.
>>> "44%s"%(s.lstrip("0"))
'447123456789'
If we want to consider only the first character from string then we can try following:
(above two solution will not when more then one "0" at starting of string.)
>>> if s[0]=="0":
... s = s[1:]
...
>>> "44%s"%s
'447123456789'
Or go with solution from jamylak
>>> s = '07123456789'
>>> "44%s%s"%(s[0].strip("0"), s[1:])
'447123456789'
+44to the front. Otherwise you cannot distinguish betewen phone numbers which started to have no0, but a44at the start. (I suppose adding the44should only happen if there was a0, otherwise not.)0at the first place? Is it supposed to contain the prefix already or is it an error case?