You are viewing a single comment's thread. Return to all comments →
from itertools import combinations lst = list(13*'c' + 13*'d' + 13*'h' + 13*'s') comb = list(combinations(lst,2)) x = [i for i in comb if i[0]==i[1]] print(len(x) / len(comb))
Seems like cookies are disabled on this browser, please enable them to open this website
Day 3: Cards of the Same Suit
You are viewing a single comment's thread. Return to all comments →