Files
curriculum/1.solar-system/3.strings/03.the-methods/starter/starter.py

16 lines
440 B
Python

def transform(s):
"""Apply three string transformations and return them in a dict.
Keys:
"upper" — s.upper()
"lower" — s.lower()
"clean" — s stripped of leading/trailing whitespace,
lowercased, with spaces replaced by underscores
transform(" Hello World ") returns:
{"upper": " HELLO WORLD ",
"lower": " hello world ",
"clean": "hello_world"}
"""
pass