【Python】英文から語順整序問題を作成する
import reimport random# 神奈川県高校入試 R4_2022 [4] アsentence = "English is spoken by many people as their first languege."# 文字列"."や"?"の前に空白を追加sentence = sentence[:-1] + " " + sentence[-1]# リストに変換words = sentence.split()words#['English', 'is', 'sp