Q01 Python Question - 1% of final grade - Due July 10, 2022 Write a Python function that changes the nth occurrence of a
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Q01 Python Question - 1% of final grade - Due July 10, 2022 Write a Python function that changes the nth occurrence of a
Question - 1% of final grade - Due July 10, 2022 Write a Python function that changes the nth occurrence of a given word in a list of words to uppercase letters. Find below the signature of the function. The function should return the new list. def uppercaseNthOccurrence (inputlist, word, n): The input list "final, nail, nail, box, box, nail, fail, final, nail, nail, box" would return "final, nail, nail, box, box, NAIL, fail, final, nail, nail, box", if the word were "nail" and n were 3.
Q01 Python