Python :string index error solution need

while i<len(b):
	if (b[i]==b[i+1]):

The error message show the index out of range.
how to solve it.

First you must tell us what your code is supposed to do. You can not refer to i + 1 in b[i+1] because when the while loop is in its last iteration, i + 1 would refer to an index which is beyond the max index of the string. Why? Because strings are zero-indexed just like arrays.

The program check to how many characters present in a name which is given by user.

From what you describe, it sounds like the code is supposed to print the number of characters in the name enter by user?