count how many characters in the same position are eqial in both strings

Solutions on MaxInterview for count how many characters in the same position are eqial in both strings by the best coders in the world

showing results for - "count how many characters in the same position are eqial in both strings"
Debora
19 Apr 2020
1sum(1 if c1 == c2 else 0 for c1, c2 in zip(string1, string2))
Juan Martín
31 Jun 2017
1sum(c1 == c2 for c1, c2 in zip(string1, string2))
similar questions