Message from Python discussions

November 2018

— Just wanted to understand why he complains of this line:
print conn.recv (1024)

— 

'''def pat(str):

 inc=0

 dec=0

 s=''

 for i,c in enumerate(str):

  if inc==2 or dec==2:

    s=s[0:-1]+"-"+c

  elif inc>2 or dec>2:

    s=s[0:-1]+c

  else:

    s+=c

  if i+1==len(str):

    break

  if ord(c)+1==ord(str[i+1]):

    inc+=1

  else:

    inc=0

  if ord(c)-1==ord(str[i+1]):

    dec+=1

  else:

    dec=0

 return s

i="12345"

print(pat(i))'''


— Why we take inc==2 here

— I'll check it, thanks.

— Hello

— Only english?

— Yes

— I russian

— And english

— 🌚

— !otherlanguages

— Thanks