fork download
  1. rows = [list(input()) for w in range(5) ]
  2.  
  3. i=0
  4. string = ""
  5. longest_list = max(rows,key=len)
  6. lenL = len(longest_list)
  7. while i<lenL:
  8. for row in rows:
  9. lenR = len(row)
  10. if lenR > i :
  11. string+=row[i]
  12. i+=1
  13. print(string)
Success #stdin #stdout 0.12s 14156KB
stdin
abc
de
fghi
jklmno
pqr
stdout
adfjpbegkqchlrimno