Question: def addListElements (aList): -write a funciton that takes in a list (alist) of items and returns a tuple of length 2. -The Oth element of

 def addListElements (aList): -write a funciton that takes in a list

def addListElements (aList): -write a funciton that takes in a list (alist) of items and returns a tuple of length 2. -The Oth element of this tuple should be a sum of all the ints and floats in alist, and the 1st element of the tuple should be a concatenation of all the strings from alist -Other types (e.g., bool) should be ignored -If there are no ints or floats, the sum should be zero. If there are no strings, the second element of the tuple should be an empty string. ***Hint: think of creating a variables that you initialize to the default values ( and "'), which will, for example, help you keep track of the running sum. *** return "stub

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!