def AmIDigits(aList):
#iterate through a list
for item in aList:
#check if any values in aList are intergers or string with digit
#check to see if any element is a string with letters
if type(item) == int or item.isdigit():
#return concatenation of every element
return ''.join(str(item) for item in aList)
if item.isalpha() in aList:
#return "The length of the input is len(aList)."
return "The length of the input is " + str(len(aList)) + "."
仅当aList [0]中有诸如“ hello”之类的内容时,此方法才有效,但如果在其他任何索引中具有数字,则将其添加