16.
def all_pairs(xs,ys):
xy_list=[]
for x in xs:
for y in ys:
xy=(x,y)
xy_list.append(xy)
return(xy_list)
all_pairs([1,2,3], ['a','b'])
17.
def stringify_pairs(pairs):
xystr_list=[]
for xy in pairs:
(x, y)=xy
xystr=str(x)+str(y)
xystr_list.append(xystr)
return(xystr_list)
stringify_pairs([(1,"hi"),(True,False),(3,4)])