Skip to main content
Practice

Coding Quiz

This coding quiz requires writing a function that uses Python's for loop and lists to process each element sequentially.

Pass a list of strings as input to the solution function, and write Python code that outputs the length of each string in the list.

Parameter Format
def solution(strings):
# Write your code here
return


Constraints

  • The input must be a list of strings.

  • Each element in the list must be a non-empty string.


Example Input and Output

  • Input: ["hello", "world", "python"]

  • Output: [5, 5, 6]

Want to learn more?

Join CodeFriends Plus membership or enroll in a course to start your journey.