Question: 4. Write a function called doubleStrings() that accepts a list of strings. The function should return a list that contains all the strings, but doubled.
4. Write a function called doubleStrings() that accepts a list of strings. The function should return a list that contains all the strings, but doubled. That is, if your list contains the strings (hi', 'bye', '401'], then your function should return a list that contains: ['hihi', 'byebye', '4014011. For example! words = ['hello', 'collective', 'bicycle','car', 'catalog', 'resources'] print (doubleStrings (words)) # C'hellohello', 'collectivecollective', 'bicyclebicycle', 'carcar', 'catalogcatalog', 'resourcesresources']
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
