Generation

generate functionThu, 15 Dec 2022

word=['火星','SUN','MOON','タイタン','冥王星'] Output only alphabetic and 4-letter words from this list.

list=['火星','SUN','MOON','タイタン','冥王星'] def list_alphabet(list): for i in list: if i.isalpha() & (len(i) == 4): print(i) list_alphabet(list)

Questions about programming?Chat with your personal AI assistant