Created
June 2, 2022 21:33
-
-
Save shalithasuranga/74d71bc8e4d1bb8f1df150bc20e4a862 to your computer and use it in GitHub Desktop.
This file contains 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
def get_short_name(full_name): | |
names = full_name.split(' ') | |
short_name = '' | |
for i in range(len(names)): | |
if i < len(names) - 1: | |
short_name += names[i][0] + '. ' | |
else: | |
short_name += names[i] | |
return short_name; | |
print(get_short_name(input())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment