缩写词是由一个短语中每个单词的第一个字母组成均为大写。例如CPU是短语central processing unit的缩写。以下函数acronymphrase输入字符串完成输出缩写词的功能。在下划线处填上正确的表达式。def acronymphrase p=phrasetitle ———— s= for i in rangelenl ———— retur
l=p.split()
s=''
for i in range(len(l)):
s+=l[i][0]
return s
原文地址: https://www.cveoy.top/t/topic/cr5k 著作权归作者所有。请勿转载和采集!