#52EasyStrings· String Methods
String Manipulation Mastery
Input format
`text`: a string of printable ASCII characters.
Output format
A dictionary with the six keys above, in that order.
Examples
Input: text = "Never odd or even"
Output: {"reversed":"neve ro ddo reveN","vowels":6,"is_palindrome":true,"most_common":"e","underscored":"Never_odd_or_even","digits":""}
Without spaces and case the text reads `neveroddoreven` both ways. `e` occurs 4 times, more than any other character.
Input: text = "Room 101"
Output: {"reversed":"101 mooR","vowels":2,"is_palindrome":false,"most_common":"o","underscored":"Room_101","digits":"101"}
`o` and `1` both appear twice; `o` comes first.
Constraints
- 0 <= len(text) <= 1000
Study first
- #python
- #strings
- #slicing
- #string-methods
