You are viewing a single comment's thread. Return to all comments →
lst1=[1,2,3,4,5,6] lst2=[1,2,3,4,5,6] #lst3=[] #lst4=[] count=0 count_of_occurences=0 for i in range(0,len(lst1)): for j in range(0,len(lst2)): if lst1[i]+lst2[j]>0: count_of_occurences+=1 if lst1[i]!=lst2[j] and lst1[i]+lst2[j]==6: count+=1 # lst3.append(lst1[i]) # lst4.append(lst2[j]) #print(lst3) #print(lst4) print(count) print(count_of_occurences)
Seems like cookies are disabled on this browser, please enable them to open this website
Day 2: More Dice
You are viewing a single comment's thread. Return to all comments →