how to concatenate two string from 2 list in one list without getting double quotation doubled?
Question:
i have two list i want to have concatenation without additional quote ,and those lists that i want to enter
a=["a"]
b=["b"]
** how i can pass it in matrix like this**
matrix["ab"]
** or how i can get this result , i try append and concatenate but it doesn’t work**
c=["ab"]
Answers:
Use
d = list([a[0]+b[0]])
or use the code below which also combines strings from longer lists such as [‘a’, ‘c’] and [‘b’, ‘e’]
d = [i+j for i, j in zip(a,b)]
i have two list i want to have concatenation without additional quote ,and those lists that i want to enter
a=["a"]
b=["b"]
** how i can pass it in matrix like this**
matrix["ab"]
** or how i can get this result , i try append and concatenate but it doesn’t work**
c=["ab"]
Use
d = list([a[0]+b[0]])
or use the code below which also combines strings from longer lists such as [‘a’, ‘c’] and [‘b’, ‘e’]
d = [i+j for i, j in zip(a,b)]