Question: lower() - A lowercase version of string .upper() - An uppercase version .replace(old,new) - A new version of string in which every occurrence of the

lower() - A lowercase version of string .upper() - An uppercase version .replace(old,new) - A new version of string in which every occurrence of the substring old is replaced by the string new. .count() - method is used to count the occurrences of a specific element in a sequence ''' sentence = "'Dog' 'Outlet' 'dodge' 'Dog' 'frame' 'Chair' 'eBook' 'Cat' 'Chair' 'Frame' 'Computer' 'pc' 'Dodge' 'Pc' 'Dog' 'cat' 'PC' 'dog'" #Replace the single quotes with an empty string in @var sentence and, #convert to lowercase, assign to @var myString.#count the number of times the word dog appears in myString, assign to #@var dogCount #count the number of times the word pc appears in myString, assign to #@var pcCount#print "Dog Count: PC Count: "#print myString

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 Law Questions!