Created
June 4, 2021 04:29
-
-
Save sameerg07/42b8f6025275a1c3deb8fe82516fa216 to your computer and use it in GitHub Desktop.
Convert first letter to capital in each word of a string python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Read the input string | |
input_string = input() | |
# Write your code here | |
nl = input_string.split(" ") | |
for i in range(len(nl)): | |
nl[i] = nl[i][0].upper() + nl[i][1:] | |
print(' '.join(nl)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment