Home > Software design >  how to concatenate two string from 2 list in one list without getting double quotation doubled?
how to concatenate two string from 2 list in one list without getting double quotation doubled?

Time:12-13

i have two list i want to have concatenation without additional quote ,and those list 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"]

CodePudding user response:

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)]
  • Related