Skip to content

Instantly share code, notes, and snippets.

@kdoodoo
Created September 18, 2016 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kdoodoo/a30fe25645fd9687e6f9ed80e29e2590 to your computer and use it in GitHub Desktop.
Save kdoodoo/a30fe25645fd9687e6f9ed80e29e2590 to your computer and use it in GitHub Desktop.
x = raw_input("Enter a Word: ")+" "
y = (len(x))
k = 1
for i in range (1,y):
if x[i-1] == x[i]:
k = k + 1
if x[i-1] != x[i]:
print x[i-1] ,k
k = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment