This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" Module for zipped two sequences. First - keys, last - values. If | |
first sequence is longer, values filled "None", else ignore this pair. | |
""" | |
import itertools | |
def zip_sequence(s1, s2): | |
try: | |
result = dict([i for i in itertools.zip_longest(s1, s2, fillvalue=None) if i[0]]) | |
except TypeError: |
NewerOlder