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.67 tracks/python/exercises/transpose/example.py
trackler-2.2.1.66 tracks/python/exercises/transpose/example.py
trackler-2.2.1.65 tracks/python/exercises/transpose/example.py
trackler-2.2.1.64 tracks/python/exercises/transpose/example.py
trackler-2.2.1.63 tracks/python/exercises/transpose/example.py
trackler-2.2.1.62 tracks/python/exercises/transpose/example.py
trackler-2.2.1.61 tracks/python/exercises/transpose/example.py
trackler-2.2.1.60 tracks/python/exercises/transpose/example.py
trackler-2.2.1.59 tracks/python/exercises/transpose/example.py
trackler-2.2.1.58 tracks/python/exercises/transpose/example.py
trackler-2.2.1.57 tracks/python/exercises/transpose/example.py
trackler-2.2.1.56 tracks/python/exercises/transpose/example.py
trackler-2.2.1.55 tracks/python/exercises/transpose/example.py
trackler-2.2.1.54 tracks/python/exercises/transpose/example.py
trackler-2.2.1.53 tracks/python/exercises/transpose/example.py
trackler-2.2.1.52 tracks/python/exercises/transpose/example.py
trackler-2.2.1.51 tracks/python/exercises/transpose/example.py
trackler-2.2.1.50 tracks/python/exercises/transpose/example.py
trackler-2.2.1.49 tracks/python/exercises/transpose/example.py
trackler-2.2.1.48 tracks/python/exercises/transpose/example.py