This is the code:
class Deck:
suits = ['Spades', 'Clubs', 'Diamonds', 'Hearts']
nums = [2, 3, 4, 5, 6, 7, 8, 9, 10, 'J', 'Q', 'K', 'A']
deck = [f"{j} of {i}" for j in nums for i in suits]
#print(deck)
But when it compiled, it gave me this error:
deck = [f"{j} of {i}" for j in nums for i in suits]
NameError: name 'suits' is not defined
I have literally no idea why--although I am pretty new to OOP and trying to test it out on some of my projects.