- Problem 4 Write Code In The Cell Below That Does The Following 1 Create A List Called Words From The Words In The Stri 1 (31.28 KiB) Viewed 50 times
Problem 4 Write code in the cell below that does the following: 1. Create a list called words from the words in the stri
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Problem 4 Write code in the cell below that does the following: 1. Create a list called words from the words in the stri
Problem 4 Write code in the cell below that does the following: 1. Create a list called words from the words in the string sentence. 2. Iterate over words A. Create a list called wordLens which contains the length of every element in words. B. Count the number of words in words using the variable numWords. C. Print the word and the word length. 3. Print numWords as shown in expected output. 4. Print the list wordLens. You need one loop to solve this problem. You need to use the len and split functions.