logo CodeStepByStep logo

marshall_mathers

Language/Type: Python string

Given the following variable declarations:

#       0123456789012345678901234
s1   = "Snoop Dogg"
s2   = "Marshall 'Eminem' Mathers"
s3   = s2[18:]
book = "Building Python Programs"

Give the results of the following expressions. Make sure to indicate a value of the proper type (e.g. strings in " " quotes).

len(s1)
len(s2)
s1.find("o")
s2.find("x")
s1[6:9]
s2[21:]
book[9:14]
s3.lower()

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.