Question: def crazy_str(s): Given a string s, return a crazy looking version where the first char is lowercase, the second is uppercase, the third is
def crazy_str(s):
"""
Given a string s, return a crazy looking version where the first
char is lowercase, the second is uppercase, the third is lowercase,
and so on. So 'Hello' returns 'hElLo'. Note that you can use the python .upper() and .lower() methods. The .upper() method returns a string where all characters are in upper case (and analogously for .lower())
>>> crazy_str('Hello')
'hElLo'
>>> crazy_str('@xYz!')
'@XyZ!'
>>> crazy_str('')
''
"""
result = ''
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
