Question: ) Write a Python program to display a string's index 0, 1, 2, 6, 7, 8, 12, 13, 14, 18, 19, 20, ... (3


) Write a Python program to display a string's index 0, 1, 2, 6, 7, 8, 12, 13, 14, 18, 19, 20, ... (3 on and 3 off pattern) location characters for any string given. "abcdefghijklmnopqrstuvwxyz" Sample Input String: Sample Output: abcghimnostuyz 2. (30pts) Write a Python program to find out all index locations that has a certain pattern a string. (return a list, return [] if no such pattern in the string.) Sample String: "abaaababbbbaaabbabababababbbaaaaabababababbbbb" Pattern: "abb" Sample Output: [6, 13, 24, 40]
Step by Step Solution
3.50 Rating (153 Votes )
There are 3 Steps involved in it
Here are two Python programs for your requested tasks Task 1 Display Characters at Specific Index Lo... View full answer
Get step-by-step solutions from verified subject matter experts
