一个关于Python的,希望和大家一起学习探讨共勉,非常感谢,一个人不太理解
l = ("hello",10,"goodbye",3,"goodnight",5) n = 0 for i in l: if isinstance(i,str) and i.isalpha(): n += 1 print(f"There are {n} words in the tuple.")