Suppose that s1, s2, s3, and s4 are four strings, given as follows: s1 = "Welcome to Python" s2 = s1 s3 = "Welcome to Python" s4 = "to" What are the results of the following expressions? a. s1 == s2...


Suppose that s1, s2, s3, and s4 are four strings, given as follows:
s1 = "Welcome to Python"
s2 = s1
s3 = "Welcome to Python"
s4 = "to"
What are the results of the following expressions?
a. s1 == s2
b. s2.count('o')
c. id(s1) == id(s2)
d. id(s1) == id(s3)
e. s1 <=>
f. s2 >= s4
g. s1 != s4
h. s1.upper()
i. s1.find(s4)
j. s1[4]
k. s1[4 : 8]


l. 4 * s4
m. len(s1)
n. max(s1)
o. min(s1)
p. s1[-4]
q. s1.lower()
r. s1.rfind('o')
s. s1.startswith("o")
t. s1.endswith("o")
u. s1.isalpha()
v. s1 + s1



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here