'''
@Author: SaminShi
@Date: 2019-12-01 09:06:01
@LastEditors: SaminShi
@LastEditTime: 2019-12-01 09:51:43
@Description: example
@Email: shizhimin0406@163.com
@Company: xxx
@version: 1.0
'''
# -*- coding:utf-8 -*-
#! /usr/bin/env python3

import collections

Card = collections.namedtuple('Card',['rank','suit'])

class FrenchDeck:
    ranks = [str(n) for n in range(2,11)] + list('JQKA')
    suits = 'spades diamonds clubs hearts'.split()

    def __init__(self):
        self._cards = [Card(rank,suit) for suit in self.suits 
                                       for rank in self.ranks]

    def __len__(self):
        return len(self._cards)

    def __getitem__(self,position):
        return self._cards[position]
50e9356a258806641b4432fc440611a792f55be2
<mask token>


class FrenchDeck:
    <mask token>
    <mask token>

    def __init__(self):
        self._cards = [Card(rank, suit) for suit in self.suits for rank in
            self.ranks]

    def __len__(self):
        return len(self._cards)
    <mask token>

<mask token>


class FrenchDeck:
    <mask token>
    <mask token>

    def __init__(self):
        self._cards = [Card(rank, suit) for suit in self.suits for rank in
            self.ranks]

    def __len__(self):
        return len(self._cards)

    def __getitem__(self, position):
        return self._cards[position]

<mask token>
Card = collections.namedtuple('Card', ['rank', 'suit'])


class FrenchDeck:
    ranks = [str(n) for n in range(2, 11)] + list('JQKA')
    suits = 'spades diamonds clubs hearts'.split()

    def __init__(self):
        self._cards = [Card(rank, suit) for suit in self.suits for rank in
            self.ranks]

    def __len__(self):
        return len(self._cards)

    def __getitem__(self, position):
        return self._cards[position]

<mask token>
import collections
Card = collections.namedtuple('Card', ['rank', 'suit'])


class FrenchDeck:
    ranks = [str(n) for n in range(2, 11)] + list('JQKA')
    suits = 'spades diamonds clubs hearts'.split()

    def __init__(self):
        self._cards = [Card(rank, suit) for suit in self.suits for rank in
            self.ranks]

    def __len__(self):
        return len(self._cards)

    def __getitem__(self, position):
        return self._cards[position]

'''
@Author: SaminShi
@Date: 2019-12-01 09:06:01
@LastEditors: SaminShi
@LastEditTime: 2019-12-01 09:51:43
@Description: example
@Email: shizhimin0406@163.com
@Company: xxx
@version: 1.0
'''
# -*- coding:utf-8 -*-
#! /usr/bin/env python3

import collections

Card = collections.namedtuple('Card',['rank','suit'])

class FrenchDeck:
    ranks = [str(n) for n in range(2,11)] + list('JQKA')
    suits = 'spades diamonds clubs hearts'.split()

    def __init__(self):
        self._cards = [Card(rank,suit) for suit in self.suits 
                                       for rank in self.ranks]

    def __len__(self):
        return len(self._cards)

    def __getitem__(self,position):
        return self._cards[position]