Why does line 21 not work? | Sololearn: Learn to code for FREE!


Why does line 21 not work?

Help me https://code.sololearn.com/cOuKw017PLU7/?ref=app

4/15/2018 8:58:15 AM

Raphael Shay

7 Answers

New Answer


If you want to deal all those cards to both the player and computer, here's some hints: cards.remove(cards[0]) # there is no zero in the cards EDIT: Raphael this will remove the first item of the list. You may replace it with taking the last one -- it's irrelevant here -- by using .pop() playerCards.append(moveCard) # += will add elements of each string not the string itself computerCards.append(moveCard) # same as above devide = 1 # not ==, as this is a comparison, not assignment devide = 2 # same as above


Share your code please :)


Akib Reza Wow very funny, if that makes you laugh, so I feel bad for you


Best question i have seen till nowπŸ˜‚πŸ˜‚πŸ˜‚πŸ‘πŸ‘πŸ‘


Akib Reza: why what's so funny?


And what do I do if I want to remove the first item on the list?


@Raphael shay You didn't post the code earlier and asked that weird question. Why wouldn't it be funny.