You are viewing a single comment's thread. Return to all comments →
In python3
binary_string = f"{n:b}" binary_segments = binary_string.split("0") segment_lengths = map(len, binary_segments) max_length = max(segment_lengths) print(max_length)
Seems like cookies are disabled on this browser, please enable them to open this website
Day 10: Binary Numbers
You are viewing a single comment's thread. Return to all comments →
In python3