I need build a function to transform 1st character only, from any word but also this function need address the problem if the 1st character from the word doesn't starts with a character, for example '_sun',' -tree', '2cat' these words need be like _Sun, -Tree, 2Cat. This is what I have so far, it can convert any word but I don't know how do 2nd part, need use ASCII?? to get value of 1st character and see if the word starts with character?
def convert(capital):
return capital[0].upper() + capital[1:]
def main():
print(convert('sun'))
main()