Skip to content

Instantly share code, notes, and snippets.

View henryeleonu's full-sized avatar

Henry Eleonu henryeleonu

View GitHub Profile
@henryeleonu
henryeleonu / gist:4dbcfbfd44e521b5cbbbb090b39adb9b
Created September 10, 2021 22:24
Elementwise division of two lists in python
mult_list = [126, 503]
test_list = [(1, 3, 5), (1, 4, 26)]
print("The original multiply list : " + str(mult_list))
# printing original list
print("The original list : " + str(test_list))
res = []
for i in range(len(mult_list)):
res.append(tuple(ti/mult_list[i] for ti in test_list[i]))
print(res)