-3

I have two lists like this:

list_a = ["Orange", "Kiwi", "Apple", "Orange"]
list_b = ["sweet", "bitter", "nice", "good for skin"]

How to concatenate the two lists to become like this:

list_c = ["Orange", "sweet", "Kiwi", "bitter", "Apple", "nice", "Orange", "good for skin"]

What I got is just adding the last element.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
theDreamer911
  • 85
  • 1
  • 9
  • "*Note: Please help using Python or maybe JavaScript is fine.*" These two languages are executed entirely differently. How would one be of assistance instead of the other...? What is your broader project using? – esqew Jun 16 '22 at 23:03
  • Also note that Stack Overflow is not tutorial service, nor intended to replace existing tutorials or documentation. – martineau Jun 16 '22 at 23:05
  • note: I never copying it from internet sir, it just an analogy, but thanks for the reminder I'm stupid and still a newbie, please take care of me, sir, I will learn it more. Thanks for the rating @mkrieger1 – theDreamer911 Jun 16 '22 at 23:08
  • thanks for your recommendation, next time I will do more better question @esqew – theDreamer911 Jun 16 '22 at 23:09
  • Thank you sir, I will learn more about it, and helping other, really thanks, sorry for my stupidness @martineau – theDreamer911 Jun 16 '22 at 23:10
  • I see, thanks for the answer @martineau, next time I would like to giving more time finding the solution – theDreamer911 Jun 16 '22 at 23:18

1 Answers1

1

Assuming both the lists have same length.

list_a = ["Orange", "Kiwi", "Apple", "Orange"]
list_b = ["sweet", "bitter", "nice", "good for skin"]

list_c = []
for a, b in zip(list_a, list_b):
    list_c.append(a)
    list_c.append(b)

print(list_c)

Output:

['Orange', 'sweet', 'Kiwi', 'bitter', 'Apple', 'nice', 'Orange', 'good for skin']
BhusalC_Bipin
  • 801
  • 3
  • 12