(cards)
| 2 | import unittest |
| 3 | |
| 4 | def shuffle(cards): |
| 5 | max = len(cards)-1 |
| 6 | while max != 0: |
| 7 | r = random.randint(0, max) |
| 8 | cards[r], cards[max] = cards[max], cards[r] |
| 9 | max = max - 1 |
| 10 | return cards |
| 11 | |
| 12 | class TestCase(unittest.TestCase): |
| 13 | def setUp(self): |
no outgoing calls