Question & Answer: eter a list of strings and returns a list containing each string twice……

Write the code in PYTHON 3.

Question 40 5 pts Write a function double that takes as a parameter a list of strings and returns a list containing each string twice.

Don't use plagiarized sources. Get Your Custom Essay on
Question & Answer: eter a list of strings and returns a list containing each string twice……
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS $13/PAGE
Order Essay

Write a function double that takes as a parameter a list of strings and returns a list containing each string twice.

Expert Answer

 

In the following Python program we use a double() function that takes in a list of strings as parameter and duplicates each string in the list. It does so by using the extend function.

CODE :

Question & Answer: eter a list of strings and returns a list containing each string twice...... 1Output:

Question & Answer: eter a list of strings and returns a list containing each string twice...... 2

Still stressed from student homework?
Get quality assistance from academic writers!