On Tue 08 Jan 2013 08:07:57 PM EST, Alan Gauld wrote:
On 05/01/13 01:27, Nathaniel Huston wrote:
def deal(quantity):
hand = []
for cards in range(0, quantity):
hand.append(deck.pop())
return hand
> #we find that the global deck has been modified within the deal()
> fu
On 9 January 2013 01:07, Alan Gauld wrote:
> On 05/01/13 01:27, Nathaniel Huston wrote:
>
>> def deal(quantity):
>>
>> hand = []
>> for cards in range(0, quantity):
>> hand.append(deck.pop())
>> return hand
>
>
>> #we find that the global deck has been modified within the d
On 05/01/13 01:27, Nathaniel Huston wrote:
def deal(quantity):
hand = []
for cards in range(0, quantity):
hand.append(deck.pop())
return hand
> #we find that the global deck has been modified within the deal()
> function without including
>
> global deck
>
> #within th
As far as I understood, this shouldn't be possible. this is python 2.7
weirdness is in deal() at the end
import random
class card:
def __init__(self, suit, rank, name):
self.suit = suit
self.rank = rank
self.name =