Advertisement
Guest User

Thanks! :)

a guest
Feb 19th, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. pack=[] # Defining the pack of cards
  2. colours = ['\u2660', '\u2661', '\u2662', '\u2663']
  3. numbers = ['2','3','4','5','6','7','8','9','10','J','Q','K','A']
  4. for val in numbers:
  5. for col in colours:
  6. pack.append(val+col) # Example: 'J\u2663'
  7.  
  8. for x in range (0,len(l)): # "Attempt" at a solution. Obviously does not work.
  9. for i in range (1, len(l)):
  10. if l[i] == l[x]:
  11. l.remove(l[x])
  12. l.remove(l[x])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement