while True: s = input("文字列?") if s == "": break words = s.split() print(f"分割結果→{words}") print("終了!") # プログラム8-24(空白文字の並びで切ってリストにする)