隨堂練習 05
題目敘述與分數比率
注意事項
a = ['A', 'B', 'C'] b = ['X', 'Y', 'Z'] c1 = [] for i in a: for j in b: c1.append(i + j) c2 = [i + j for i in a for j in b]
a = ['A', 'R', 'Y', 'X', 'C', 'R'] b = [ 5, 1, 2, 3, 2, 4] print(sorted(zip(a, b))) print(sorted(zip(b, a)))