举个例子, print(recAbbrev(['central','processing','unit'])) 应该返回 'CPU' 这是我现在的代码: def recAbbrev(lst):'return a single string with the first character of all the strings in a list combined and capitalizedif len(lst)==0:
print(
我需要打印list的元素,这样如果一个元素是100或更高,那么它后面是一个换行符,如果不是,则后面是一个空格。到目前为止,这就是我所拥有的: if list == []: elif list[0] >= 100:print(list[0], function(list[1:]), end = '\n')