View the step-by-step solution to:

Question

I am trying to figure out how to loop through a list, in this vase we would call it args.listing and retrieve the

length of each element in said list.

I am trying to have an input as an example of something like "this is a test" and receive back 4 2 1 4, but I am still only able to get it to return 4, for the 4 strings in the list.

Top Answer

The code is given below to iterate... View the full answer

chrome_96Sj3ksfx3.png

1s=["this"
"is"
a", "test" ]
for temp in 1s:
print (len (temp ) , end='
print ()
string="this is a test"
1s=string. split('
for temp in 1s:
print (len...

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question