seed: curriculum content
This commit is contained in:
15
1.solar-system/3.strings/03.the-methods/starter/starter.py
Normal file
15
1.solar-system/3.strings/03.the-methods/starter/starter.py
Normal file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
Reference in New Issue
Block a user