1-liner Python using itertools.izip_longest()


  • 0
    C
    return words== ["".join(filter(None,elem)) for elem in itertools.izip_longest(*words)]
    

    The idea is pretty much similar as using map function


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.