first commit
This commit is contained in:
8
tuple_addition.py
Normal file
8
tuple_addition.py
Normal file
@@ -0,0 +1,8 @@
|
||||
def tuple_add(t1, t2):
|
||||
n = len(t1)
|
||||
if n != len(t2):
|
||||
raise TypeError()
|
||||
ret = []
|
||||
for i in range(n):
|
||||
ret.append(t1[i] + t2[i])
|
||||
return tuple(ret)
|
||||
Reference in New Issue
Block a user