Removing matching items from a list?

kevin4fong at gmail.com kevin4fong at gmail.com
Sat Aug 3 20:33:09 EDT 2013


On Saturday, August 3, 2013 5:25:16 PM UTC-7, Steven D'Aprano wrote:
> On 2013年8月03日 19:06:05 -0400, Roy Smith wrote:
>>>> > In article <51fd86350ドル30000ドル$c3e8da3$5496439d at news.astraweb.com>,
>> > Steven D'Aprano <steve+comp.lang.python at pearwood.info> wrote:
>> > 
>> >> 2) Then go through those initial letters, and pick out the ones equal
>> >> to 4 (or should that be "four or more"?).
>> > 
>> > Assuming my earlier hunch is correct about these being cards in a deck,
>> > and the a's being aces, I would hope it's not "four or more". See my
>> > earlier comment about saloons and gunshot wounds.
>>>> There are card games that involve more than four suits, or more than one 
>> pack. In principle, if you draw ten cards from an unknown number of 
>> packs, you could draw ten Aces, or even ten Aces of the same suit. Think 
>> of playing blackjack with ten packs shuffled together.
>>>> Cripple Mr Onion, for example, uses hands of ten cards drawn from eight 
>> suits:
>>>> http://discworld.wikia.com/wiki/Cripple_Mr_Onion
>>>> (yes, it's a real game, based on a fictional game)
>>>>>> The Indian Ganjifa deck uses ten "houses" (decks) of 12 cards each.
>>>> Pinochle uses the standard four Western suits, but uses two copies of 
>> each card 9, 10, J, Q, K, A, for 48 cards in total. Sometimes people 
>> combine two pinochle decks for larger games, so with a double deck all 
>> ten cards could be Aces.
>>>> In the 1930s, there was a fad for playing Bridge with a fifth suit, 
>> coloured green, called Royals, Leaves, Eagles or Rooks depending on the 
>> manufacturer.
>>>> There are five- and six-suit versions of poker, with at least two still 
>> commercially available: the five-suit Stardeck pack (which adds Stars), 
>> and the six-suit Empire deck (which adds red Crowns and black Anchors).
>>>> There is an eight-suit Euchre pack that adds red Moons, black Stars, red 
>> four-leaf Clovers and black Tears to the standard deck.
>>>>>>>> -- 
>> Steven

Thank you for the advice. It was really helpful with the descriptions and steps.
Would you also happen to know how I could set up a list that keeps track of the removed sets?
Let's say there's 4 a's taken out. The list would show:
['a']
But if there was also 4 j's in addition to the 4 a's, it would go:
['a', 'j']
and so forth. 


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /