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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!