16th Jan 2019, 8:01 PM
Raphael Shay
Raphael Shay - avatar
7 Answers
+ 6
Nothing. pop() will return the last element from the list. You can add an index to get the element with that index, for example .pop(0) will return the first element, .pop(5) will return the sixth element etc., but the list is shuffled anyway so it doesn't make any difference
16th Jan 2019, 8:16 PM
Anna
Anna - avatar
+ 3
You try to remove an element (0) from a list that's not in the list
16th Jan 2019, 8:03 PM
Anna
Anna - avatar
+ 3
You're welcome! I edited my answer. Try playerHand.append(cards.pop())
16th Jan 2019, 8:10 PM
Anna
Anna - avatar
+ 2
The first character or the first card? Try cards.pop(). That will return a card and remove it from the list. You can even do playerHand.append(cards.pop())
16th Jan 2019, 8:06 PM
Anna
Anna - avatar
+ 1
Thanks! And how to I add the first character to the playerHand list?
16th Jan 2019, 8:09 PM
Raphael Shay
Raphael Shay - avatar
0
How do I remove the first character then?
16th Jan 2019, 8:04 PM
Raphael Shay
Raphael Shay - avatar
0
What should I add in those brackets?
16th Jan 2019, 8:12 PM
Raphael Shay
Raphael Shay - avatar