"[191717, 191718]","EH3105928,ISCAR 3105081","3,1"
"191717, EH3105928, 3",
"191718, ISCAR 3105081, 1"
Есть 3 списка такого плана:"[191717, 191718]","EH3105928,ISCAR 3105081","3,1"
def f(*data):
return tuple(', '.join(map(str.strip, t)) for t in zip(
*[s.lstrip('[').rstrip(']').split(',') for s in data]))
print(f("[191717, 191718]", "EH3105928,ISCAR 3105081", "3,1"))
//list1-2-3-ваши списки
//result-результирующий список
for i, data in enumerate(list1):
result.append(data)
result.append(list2[i])
result.append(list3[i])
Или так:
//list1-2-3-ваши списки
//result-результирующий список
for i, data in enumerate(list1):
element=data+", "+list2[i]+", "+list3[i]
result.append(element)
arr1 = [191717, 191718]
arr2 = ['EH3105928', 'ISCAR 3105081']
arr3 = [3, 1]
res1 = []
res2 = []
for i in range(len(arr1) - 1):
res1.append(arr1[i])
res2.append(arr1[i + 1])
res1.append(arr2[i])
res2.append(arr2[i + 1])
res1.append(arr3[i])
res2.append(arr3[i + 1])
print(res1)
print(res2)