Python 函数实现缩写词生成 - acronym(phrase)
def acronym(phrase):
p = phrase.title()
l = p.split()
s = ''
for i in range(len(l)):
s += l[i][0]
return s
phrase = input()
print(acronym(phrase))
原文地址: https://www.cveoy.top/t/topic/nvYC 著作权归作者所有。请勿转载和采集!