The code is (text[0].upper() + text[1:] + '.' * (not text.endswith('.'))), how does this code turn 'welcome to new york' to 'Welcome to New York'?