Skip to main content
Commonmark migration
Source Link

#Python 2, 88 bytes

Python 2, 88 bytes

Simple solution.

s=input()
m=map(lambda x,y:y>x,s[:-1],s[1:])
print all(x-y for x,y in zip(m[:-1],m[1:]))

Try it online

If same letters in a row were neither a rise nor a fall, the solution would be 79 bytes:

s=input()
m=map(cmp,s[:-1],s[1:])
print all(x-y for x,y in zip(m[:-1],m[1:]))

#Python 2, 88 bytes

Simple solution.

s=input()
m=map(lambda x,y:y>x,s[:-1],s[1:])
print all(x-y for x,y in zip(m[:-1],m[1:]))

Try it online

If same letters in a row were neither a rise nor a fall, the solution would be 79 bytes:

s=input()
m=map(cmp,s[:-1],s[1:])
print all(x-y for x,y in zip(m[:-1],m[1:]))

Python 2, 88 bytes

Simple solution.

s=input()
m=map(lambda x,y:y>x,s[:-1],s[1:])
print all(x-y for x,y in zip(m[:-1],m[1:]))

Try it online

If same letters in a row were neither a rise nor a fall, the solution would be 79 bytes:

s=input()
m=map(cmp,s[:-1],s[1:])
print all(x-y for x,y in zip(m[:-1],m[1:]))
added 5 characters in body
Source Link
mbomb007
  • 23.5k
  • 7
  • 63
  • 135

#Python 2, 88 bytes

Simple solution.

s=input()
m=map(lambda x,y:y>x,s[:-1],s[1:])
print all(x-y for x,y in zip(m[:-1],m[1:]))

Try it online

If same letters in a row waswere neither a rise nor a fall, the solution iswould be 79 bytes:

s=input()
m=map(cmp,s[:-1],s[1:])
print all(x-y for x,y in zip(m[:-1],m[1:]))

#Python 2, 88 bytes

Simple solution.

s=input()
m=map(lambda x,y:y>x,s[:-1],s[1:])
print all(x-y for x,y in zip(m[:-1],m[1:]))

Try it online

If same letters in a row was neither rise nor fall, the solution is 79 bytes:

s=input()
m=map(cmp,s[:-1],s[1:])
print all(x-y for x,y in zip(m[:-1],m[1:]))

#Python 2, 88 bytes

Simple solution.

s=input()
m=map(lambda x,y:y>x,s[:-1],s[1:])
print all(x-y for x,y in zip(m[:-1],m[1:]))

Try it online

If same letters in a row were neither a rise nor a fall, the solution would be 79 bytes:

s=input()
m=map(cmp,s[:-1],s[1:])
print all(x-y for x,y in zip(m[:-1],m[1:]))
Source Link
mbomb007
  • 23.5k
  • 7
  • 63
  • 135

#Python 2, 88 bytes

Simple solution.

s=input()
m=map(lambda x,y:y>x,s[:-1],s[1:])
print all(x-y for x,y in zip(m[:-1],m[1:]))

Try it online

If same letters in a row was neither rise nor fall, the solution is 79 bytes:

s=input()
m=map(cmp,s[:-1],s[1:])
print all(x-y for x,y in zip(m[:-1],m[1:]))