Question: CSC2230 Computer Programming for Engineers. This is python jupyter notebook. Write a function that takes a list of strings and returns a dictionary that has
CSC2230 Computer Programming for Engineers. This is python jupyter notebook.

Write a function that takes a list of strings and returns a dictionary that has each string as a key, and the number of characters in the string as the value. For example, given the following list, t' apple' , . orange . cat' ] the function returns the following dictionary: 'apple': 5, orange': 6 car 3) In :def strToLenDict (s): d- dict() iterate elements in the list s while creating records in dictionary d. return d
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
