GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — hackerrank-python/itertools/compress-the-string.py at master · anishLearnsToCode/hackerrank-python Expand file tree/ Copy pathcompress-the-string.pyMore file actions 14 lines (10 loc) · 278 Bytes / Copy pathcompress-the-string.pyFile metadata and controls14 lines (10 loc) · 278 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 # https://www.hackerrank.com/challenges/compress-the-string/problem import itertools line = input() result = '' for entry in itertools.groupby(line): count = 0 for element in entry[1]: count += 1 result += str((count, int(entry[0]))) + ' ' print(result) |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |