Question: in Python please Write a function called print_first_difference(string1, string2) that takes two strings as parameters, compares them character by character until a difference is found
in Python please
Write a function called print_first_difference(string1, string2) that takes two strings as parameters, compares them character by character until a difference is found and prints a line showing where that difference was found (using 1origin numbering), as shown in the examples below. If the two strings are the same, the function should print "Strings are identical". For example: Test Result print_first_difference ("abcd", "abde") Strings differ at position 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
