import random def predict_next_word(words): if random.random() < 0.5: return "banana" else: return "potato"