Quick actions

cmd+k|ctrl+k

Navigation

Languages

GiaDieu_pymihcm1708_ex3_2

Snippet info

Language

Python

Visibility

public

Author

giadieuly

Created

2017-08-12T19:07:10Z

Updated

2017-08-12T19:07:10Z

data = '''
Come to the
River
Of my
Soulful
Sentiments
Meandering silently
Yearning for release.
Hasten
Earnestly
As my love flows by
Rushing through the flood-gates
To your heart.
'''

def solve(text):
    text = text.strip()
    text = text.split('\n')
    header = ''
    for char in text:
        if char not in header:
            header = header + char[0]
    return header.capitalize()


def main():
    text = data
    print(solve(text))
    
if __name__ == "__main__":
    main()
INFO