Data Science, Statistics, Probability, Data Analytics, Data Science Interview.
created by sub-setting only those cases where two tails show up. fav_outcomes = [outcome for outcome in outcomes if sum(outcome == 'T') == 2] fav_outcomes[:10] [array(['T', 'T', 'H', 'H', 'H'], dtype='<U1'), array(['T', 'H', 'H', 'T', 'H'], dtype='<U1'), array(['T', 'T', 'H', 'H', 'H'],