I try to print cards shuffled and I already made the set of all poker cards by
class Deck(Cards):
def __init__(self):
self.mycardset = [(f'{y} of {x}') for x in self.suites for y in self.values]
def shuffleDeck(self):
random.shuffle(self.mycardset)
but when I try to print my cardset shuffled using
def main():
deck = Deck()
print(f'[Current Deck]\n{deck.mycardset}')
shuffled_deck = deck.shuffleDeck()
print(f'[Shuffled Deck]\n{shuffled_deck.mycardset}')
There is an error said "none type object has no attribute mycardset."
I think there isn't any wrong spell so mabye there is a gramatical problem but I cant find it. so please let me know how can I print shuffled mycardset not changing the main parts.