I need to complete a basic task on Python that requires me to convert a standard phone number into an international one.
So for example, if the users phone number was 0123456789, the program should display, Your international phone number is +44123456789.
I don't know how to replace the 0 with a 44. I don't know many techniques on Python so advice on how to is welcomed, thanks.
EDIT:
#Python Number Conversion
def GetInternational(PhoneNumber):
if num.startswith('0'):
num = num.replace('0','+44',1)
return GetInternational
PhoneNumber = input("Enter your phone number: ")
print('Your international number is',GetInternational,'')
I'm missing something obvious but not sure what...