Search⌘ K

Challenge 2: Let's work with lists, tuples and strings

Explore how to write Python functions that handle string manipulation effectively. Learn to convert strings into lists, count lower and uppercase letters, and determine the most frequent element by leveraging tuples and nested functions for optimized code structure.

Problem statement

Your task is to write a function, strManipulation(str), that takes a string as an argument.

There should be two functions in the strManipulation() function.

  1. Write a capitalize_listElements(str) function that capitalizes each word’s first alphabet present in the string and converts str to list. It should then count the total number of lower and upper case letters present in the list and return the updatedList, lCount
...