sentence = "Python programming is fun" word_list = sentence.split() print(f"Sentence: {sentence}\nWord List: {word_list}")
Output:
Sentence: Python programming is fun
Word List: [‘Python’, ‘programming’, ‘is’, ‘fun’]
sentence = "Python programming is fun" word_list = sentence.split() print(f"Sentence: {sentence}\nWord List: {word_list}")
Output:
Sentence: Python programming is fun
Word List: [‘Python’, ‘programming’, ‘is’, ‘fun’]