Contest Solution: Packet Sniffer
Your code looks good, except that you do not really need the c, and hence the nesting, in the list comprehension. You can use line[i:i+7] directly in int, making it a bit shorter:

''.join([chr(int(line[i:i+7], 2)) for i in range(0, len(line), 7)])


However, just removing the 1000001 in the line before seems a bit arbitrary, since (a) the pattern might also be present within a package, spanning two bytes. Instead, you could keep the c variable and ignore the current c if it equals the package delimiter:

&gt;&gt;&gt; line = "10000011100010110111111011111000001100000101000011000001"
&gt;&gt;&gt; ''.join([chr(int(c, 2)) for c in (line[i:i+7] for i in range(0, len(line), 7)) if c != "1000001"])
'boo!' 


But, you still lose the information where the packages start and end.
Instead, you could use regular expressions for first detecting the packages, and then finding the bytes within those:

&gt;&gt;&gt; p = r"1000001((?:[01]{7}){,3})1000001"
&gt;&gt;&gt; re.findall(p, line)
['110001011011111101111', '0100001']


Here, p means "package delimiter, followed by up to three groups of seven 0 or 1, followed by delimiter. Then you can use another regex q to split those into bytes.

&gt;&gt;&gt; q = r"[01]{7}"
&gt;&gt;&gt; [''.join(chr(int(x, 2)) for x in re.findall(q, y)) for y in re.findall(p, line)]
['boo', '!']


Of course, the regex q is a bit redundant, since we already checked the same in p. You could also do this part using a range and string slicing, but personally I still find the regex approach cleaner.

&gt;&gt;&gt; [''.join(chr(int(y[i:i+7], 2)) for i in range(0, len(y), 7)) for y in r e.findall(p, bits)]
['boo', '!']




Another way, without regex, might be to first separate the line into groups of 7 bits, and then using itertools.groupby to group those parts into package-delimiter and package-contents:

&gt;&gt;&gt; parts = [line[i:i+7] for i in range(0, len(line), 7)]
&gt;&gt;&gt; groups = [list(g) for k, g in groupby(parts, key="1000001".__ne__) if k]
&gt;&gt;&gt; [''.join(chr(int(b, 2)) for b in g) for g in groups]
['boo', '!']