For just samt.teil_num[1]:
from itertools import zip_longest
indices = [5,6,7,None,None]
prop = ['a','b',None,'c',None]
teil_num = ['Teil0','Teil1','Teil2','Teil3','Teil4']
data = list(zip_longest(indices,prop,[teil_num[0]],fillvalue=None))
print(data)
The output formed is:
[(5, 'a', 'Teil0'), (6, 'b', None), (7, None, None), (None, 'c', None), (None, None, None)]
if you use teil_num as a whole:
from itertools import zip_longest
indices = [5,6,7,None,None]
prop = ['a','b',None,'c',None]
teil_num = ['Teil0','Teil1','Teil2','Teil3','Teil4']
data = list(zip_longest(indices,prop,teil_num,fillvalue=None))
print(data)
Output:
[(5, 'a', 'Teil0'), (6, 'b', 'Teil1'), (7, None, 'Teil2'), (None, 'c', 'Teil3'), (None, None, 'Teil4')]
The reason for this is the string(teil_num[1]) gets typecasted as list which is as:
['T', 'e', 'i', 'l', '1']