Skip to main content
added 1 character in body
Source Link
AncientSwordRage
  • 1.5k
  • 1
  • 16
  • 40

Python 2, 128 96

I was hoping tonot to have to use itertools

a=lambda a:"".join([i for i in reduce(lambda: b,c:b+c, map(None,*map(lambda m:list(m),a)) if i])

Ungolfed

 a=lambda a:                              #Start a lambda taking in a
    "".join(                              #Join the result together with empty string
        [i for i in reduce(               #For every item, apply the function and 'keep'
           lambda: b,c:b+c,               #Add lists from...
                map(None,*map(            #None = Identity function, over a map of...
                    lambda m:list(m), a)  #list made for mthe strings m
                   ) if i                 #truthy values only (otherwise the outer map will padd with None.
       ])

Python 2, 128 96

I was hoping to to have to use itertools

a=lambda a:"".join([i for i in reduce(lambda: b,c:b+c, map(None,*map(lambda m:list(m),a)) if i])

Ungolfed

 a=lambda a:                              #Start a lambda taking in a
    "".join(                              #Join the result together with empty string
        [i for i in reduce(               #For every item, apply the function and 'keep'
           lambda: b,c:b+c,               #Add lists from...
                map(None,*map(            #None = Identity function, over a map of...
                    lambda m:list(m), a)  #list made for mthe strings m
                   ) if i                 #truthy values only (otherwise the outer map will padd with None.
       ])

Python 2, 128 96

I was hoping not to have to use itertools

a=lambda a:"".join([i for i in reduce(lambda: b,c:b+c, map(None,*map(lambda m:list(m),a)) if i])

Ungolfed

 a=lambda a:                              #Start a lambda taking in a
    "".join(                              #Join the result together with empty string
        [i for i in reduce(               #For every item, apply the function and 'keep'
           lambda: b,c:b+c,               #Add lists from...
                map(None,*map(            #None = Identity function, over a map of...
                    lambda m:list(m), a)  #list made for mthe strings m
                   ) if i                 #truthy values only (otherwise the outer map will padd with None.
       ])
deleted 93 characters in body
Source Link
AncientSwordRage
  • 1.5k
  • 1
  • 16
  • 40

Python 2, 128128 96

I was hoping to to have to use itertools

from itertools import izip_longest as z;a=lambdaa=lambda a:"".join([i fortfor i in zreduce(lambda: b,c:b+c, map(None,*map(lambda m:list(m),a)) for i in t if i is not none]i])

Ungolfed

from itertools import izip_longest as z;            # this will allow us to 'interleave' up to the longest entry
a=lambda a:                                      #Start a lambda #taking makein a lambda
    "".join(                                        ##Join jointhe aresult listtogether intowith aempty string
             [i for ti in zreduce(               #For every item, apply the function and 'keep'
   # make a list of items, for every tuple madelambda: fromb,c:b+c, the izip_longest method
            #Add lists from...
   *map(lambda m:list(m),a)           # map(None,*map( the words to lists, and unpack
      #None = Identity function, over a map of...
               ) for i in t lambda m:list(m), a)  #list made for mthe strings m
    # the other part of the comprehension
         ) if i                 if#truthy ivalues isonly not(otherwise None]the outer map will padd with None.
 # drop the padding introduced by izip_longest
])

Python, 128

I was hoping to to have to use itertools

from itertools import izip_longest as z;a=lambda a:"".join([i fort in z(*map(lambda m:list(m),a)) for i in t if i is not none])

Ungolfed

from itertools import izip_longest as z;            # this will allow us to 'interleave' up to the longest entry
a=lambda a:                                         # make a lambda
    "".join(                                        # join a list into a string
             [i for t in z(                         # make a list of items, for every tuple made from the izip_longest method
                 *map(lambda m:list(m),a)           # map the words to lists, and unpack
                          ) for i in t              # the other part of the comprehension
                            if i is not None]       # drop the padding introduced by izip_longest
)

Python 2, 128 96

I was hoping to to have to use itertools

a=lambda a:"".join([i for i in reduce(lambda: b,c:b+c, map(None,*map(lambda m:list(m),a)) if i])

Ungolfed

 a=lambda a:                              #Start a lambda taking in a
    "".join(                              #Join the result together with empty string
        [i for i in reduce(               #For every item, apply the function and 'keep'
           lambda: b,c:b+c,               #Add lists from...
                map(None,*map(            #None = Identity function, over a map of...
                    lambda m:list(m), a)  #list made for mthe strings m
                   ) if i                 #truthy values only (otherwise the outer map will padd with None.
       ])
Source Link
AncientSwordRage
  • 1.5k
  • 1
  • 16
  • 40

Python, 128

I was hoping to to have to use itertools

from itertools import izip_longest as z;a=lambda a:"".join([i fort in z(*map(lambda m:list(m),a)) for i in t if i is not none])

Ungolfed

from itertools import izip_longest as z;            # this will allow us to 'interleave' up to the longest entry
a=lambda a:                                         # make a lambda
    "".join(                                        # join a list into a string
             [i for t in z(                         # make a list of items, for every tuple made from the izip_longest method
                 *map(lambda m:list(m),a)           # map the words to lists, and unpack
                          ) for i in t              # the other part of the comprehension
                            if i is not None]       # drop the padding introduced by izip_longest
)