Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
3 added 4 characters in body
source | link

Python 2, 117 bytes

All "spaces" are tabs to reduce number of 0x20 bits.

def Y(S):
    O=map(sorted,zip(*['{:07b}'.format(ord(W))for   W   in  S]))
    return  O[1:]==O[:-1]#V_____________

Contains 66 of each bit. (Due to a bug in Python I can't useThere is no '%07b' as explained in this issue.)

Hex dump:

00000000: 64 65 66 09 59 28 53 29 3a 0a 09 4f 3d 6d 61 70  def.Y(S):..O=map
00000010: 28 73 6f 72 74 65 64 2c 7a 69 70 28 2a 5b 27 7b  (sorted,zip(*['{
00000020: 3a 30 37 62 7d 27 2e 66 6f 72 6d 61 74 28 6f 72  :07b}'.format(or
00000030: 64 28 57 29 29 66 6f 72 09 57 09 69 6e 09 53 5d  d(W))for.W.in.S]
00000040: 29 29 0a 09 72 65 74 75 72 6e 09 4f 5b 31 3a 5d  ))..return.O[1:]
00000050: 3d 3d 4f 5b 3a 2d 31 5d 23 56 5f 5f 5f 5f 5f 5f  ==O[:-1]#V______
00000060: 5f 5f 5f 5f 5f 5f 5f 16 16 16 16 16 16 16 16 16  _______.........
00000070: 16 16 14 14 10                                   .....

Python 2, 117 bytes

All "spaces" are tabs to reduce number of 0x20 bits.

def Y(S):
    O=map(sorted,zip(*['{:07b}'.format(ord(W))for   W   in  S]))
    return  O[1:]==O[:-1]#V_____________

Contains 66 of each bit. (Due to a bug in Python I can't use '%07b'.)

Hex dump:

00000000: 64 65 66 09 59 28 53 29 3a 0a 09 4f 3d 6d 61 70  def.Y(S):..O=map
00000010: 28 73 6f 72 74 65 64 2c 7a 69 70 28 2a 5b 27 7b  (sorted,zip(*['{
00000020: 3a 30 37 62 7d 27 2e 66 6f 72 6d 61 74 28 6f 72  :07b}'.format(or
00000030: 64 28 57 29 29 66 6f 72 09 57 09 69 6e 09 53 5d  d(W))for.W.in.S]
00000040: 29 29 0a 09 72 65 74 75 72 6e 09 4f 5b 31 3a 5d  ))..return.O[1:]
00000050: 3d 3d 4f 5b 3a 2d 31 5d 23 56 5f 5f 5f 5f 5f 5f  ==O[:-1]#V______
00000060: 5f 5f 5f 5f 5f 5f 5f 16 16 16 16 16 16 16 16 16  _______.........
00000070: 16 16 14 14 10                                   .....

Python 2, 117 bytes

All "spaces" are tabs to reduce number of 0x20 bits.

def Y(S):
    O=map(sorted,zip(*['{:07b}'.format(ord(W))for   W   in  S]))
    return  O[1:]==O[:-1]#V_____________

Contains 66 of each bit. (There is no '%07b' as explained in this issue.)

Hex dump:

00000000: 64 65 66 09 59 28 53 29 3a 0a 09 4f 3d 6d 61 70  def.Y(S):..O=map
00000010: 28 73 6f 72 74 65 64 2c 7a 69 70 28 2a 5b 27 7b  (sorted,zip(*['{
00000020: 3a 30 37 62 7d 27 2e 66 6f 72 6d 61 74 28 6f 72  :07b}'.format(or
00000030: 64 28 57 29 29 66 6f 72 09 57 09 69 6e 09 53 5d  d(W))for.W.in.S]
00000040: 29 29 0a 09 72 65 74 75 72 6e 09 4f 5b 31 3a 5d  ))..return.O[1:]
00000050: 3d 3d 4f 5b 3a 2d 31 5d 23 56 5f 5f 5f 5f 5f 5f  ==O[:-1]#V______
00000060: 5f 5f 5f 5f 5f 5f 5f 16 16 16 16 16 16 16 16 16  _______.........
00000070: 16 16 14 14 10                                   .....
2 deleted 3 characters in body
source | link

Python 2, 118117 bytes

All "spaces" are tabs to reduce number of 0x20 bits.

def Y(S):
    O=map(sorted,zip(*['{:07b}'.format(ord(W))for   W   in  S]))
    return  O[1:]==O[:-1]#_______________1]#V_____________

Contains 6766 of each bit. (Due to a bug in Python I can't use '%07b'.)

Hex dump:

00000000: 64 65 66 2009 59 28 53 29 3a 0a 09 4f 3d 6d 61 70  def .Y(S):..O=map
00000010: 28 73 6f 72 74 65 64 2c 7a 69 70 28 2a 5b 27 7b  (sorted,zip(*['{
00000020: 3a 30 37 62 7d 27 2e 66 6f 72 6d 61 74 28 6f 72  :07b}'.format(or
00000030: 64 28 57 29 29 66 6f 72 09 57 09 69 6e 09 53 5d  d(W))for.W.in.S]
00000040: 29 29 0a 09 72 65 74 75 72 6e 09 4f 5b 31 3a 5d  ))..return.O[1:]
00000050: 3d 3d 4f 5b 3a 2d 31 5d 23 5f56 5f 5f 5f 5f 5f 5f  ==O[:-1]#_______1]#V______
00000060: 5f 5f 5f 5f 5f 5f 5f 5f16 16 16 16 16 16 16 16 16  _______________.........
00000070: 16 16 16 14 14 10                                ..   .....

Python 2, 118 bytes

All "spaces" are tabs to reduce number of 0x20 bits.

def Y(S):
    O=map(sorted,zip(*['{:07b}'.format(ord(W))for   W   in  S]))
    return  O[1:]==O[:-1]#_______________

Contains 67 of each bit. (Due to a bug in Python I can't use '%07b'.)

Hex dump:

00000000: 64 65 66 20 59 28 53 29 3a 0a 09 4f 3d 6d 61 70  def Y(S):..O=map
00000010: 28 73 6f 72 74 65 64 2c 7a 69 70 28 2a 5b 27 7b  (sorted,zip(*['{
00000020: 3a 30 37 62 7d 27 2e 66 6f 72 6d 61 74 28 6f 72  :07b}'.format(or
00000030: 64 28 57 29 29 66 6f 72 09 57 09 69 6e 09 53 5d  d(W))for.W.in.S]
00000040: 29 29 0a 09 72 65 74 75 72 6e 09 4f 5b 31 3a 5d  ))..return.O[1:]
00000050: 3d 3d 4f 5b 3a 2d 31 5d 23 5f 5f 5f 5f 5f 5f 5f  ==O[:-1]#_______
00000060: 5f 5f 5f 5f 5f 5f 5f 5f 16 16 16 16 16 16 16 16  ________........
00000070: 16 16 16 14 14 10                                .......

Python 2, 117 bytes

All "spaces" are tabs to reduce number of 0x20 bits.

def Y(S):
    O=map(sorted,zip(*['{:07b}'.format(ord(W))for   W   in  S]))
    return  O[1:]==O[:-1]#V_____________

Contains 66 of each bit. (Due to a bug in Python I can't use '%07b'.)

Hex dump:

00000000: 64 65 66 09 59 28 53 29 3a 0a 09 4f 3d 6d 61 70  def.Y(S):..O=map
00000010: 28 73 6f 72 74 65 64 2c 7a 69 70 28 2a 5b 27 7b  (sorted,zip(*['{
00000020: 3a 30 37 62 7d 27 2e 66 6f 72 6d 61 74 28 6f 72  :07b}'.format(or
00000030: 64 28 57 29 29 66 6f 72 09 57 09 69 6e 09 53 5d  d(W))for.W.in.S]
00000040: 29 29 0a 09 72 65 74 75 72 6e 09 4f 5b 31 3a 5d  ))..return.O[1:]
00000050: 3d 3d 4f 5b 3a 2d 31 5d 23 56 5f 5f 5f 5f 5f 5f  ==O[:-1]#V______
00000060: 5f 5f 5f 5f 5f 5f 5f 16 16 16 16 16 16 16 16 16  _______.........
00000070: 16 16 14 14 10                                   .....
1
source | link

Python 2, 118 bytes

All "spaces" are tabs to reduce number of 0x20 bits.

def Y(S):
    O=map(sorted,zip(*['{:07b}'.format(ord(W))for   W   in  S]))
    return  O[1:]==O[:-1]#_______________

Contains 67 of each bit. (Due to a bug in Python I can't use '%07b'.)

Hex dump:

00000000: 64 65 66 20 59 28 53 29 3a 0a 09 4f 3d 6d 61 70  def Y(S):..O=map
00000010: 28 73 6f 72 74 65 64 2c 7a 69 70 28 2a 5b 27 7b  (sorted,zip(*['{
00000020: 3a 30 37 62 7d 27 2e 66 6f 72 6d 61 74 28 6f 72  :07b}'.format(or
00000030: 64 28 57 29 29 66 6f 72 09 57 09 69 6e 09 53 5d  d(W))for.W.in.S]
00000040: 29 29 0a 09 72 65 74 75 72 6e 09 4f 5b 31 3a 5d  ))..return.O[1:]
00000050: 3d 3d 4f 5b 3a 2d 31 5d 23 5f 5f 5f 5f 5f 5f 5f  ==O[:-1]#_______
00000060: 5f 5f 5f 5f 5f 5f 5f 5f 16 16 16 16 16 16 16 16  ________........
00000070: 16 16 16 14 14 10                                .......