Sha256: 69369287165d0b1779aaab4f97aef53cd72dadc0725a46ce3a5379c926b54387

Contents?: true

Size: 249 Bytes

Versions: 162

Compression:

Stored size: 249 Bytes

Contents

def transpose(input_lines):
    lines = input_lines.split("\n")
    zipped = map(list,
                 [line.ljust(len(max(lines, key=len)))
                  for line in lines])
    return "\n".join("".join(line) for line in zip(*zipped)).strip()

Version data entries

162 entries across 162 versions & 1 rubygems

Version Path
trackler-2.2.1.87 tracks/python/exercises/transpose/example.py
trackler-2.2.1.86 tracks/python/exercises/transpose/example.py
trackler-2.2.1.85 tracks/python/exercises/transpose/example.py
trackler-2.2.1.84 tracks/python/exercises/transpose/example.py
trackler-2.2.1.83 tracks/python/exercises/transpose/example.py
trackler-2.2.1.82 tracks/python/exercises/transpose/example.py
trackler-2.2.1.81 tracks/python/exercises/transpose/example.py
trackler-2.2.1.80 tracks/python/exercises/transpose/example.py
trackler-2.2.1.79 tracks/python/exercises/transpose/example.py
trackler-2.2.1.78 tracks/python/exercises/transpose/example.py
trackler-2.2.1.77 tracks/python/exercises/transpose/example.py
trackler-2.2.1.76 tracks/python/exercises/transpose/example.py
trackler-2.2.1.75 tracks/python/exercises/transpose/example.py
trackler-2.2.1.74 tracks/python/exercises/transpose/example.py
trackler-2.2.1.73 tracks/python/exercises/transpose/example.py
trackler-2.2.1.72 tracks/python/exercises/transpose/example.py
trackler-2.2.1.71 tracks/python/exercises/transpose/example.py
trackler-2.2.1.70 tracks/python/exercises/transpose/example.py
trackler-2.2.1.69 tracks/python/exercises/transpose/example.py
trackler-2.2.1.68 tracks/python/exercises/transpose/example.py