Tag: functions
-
Efficient List Manipulation in Python: When to Use ‘append’ and ‘extend’
Let’s say I created a function in Python to deal a group of cards. The Ace is represented by 11, Jack, Queen, and King by 10 and the rest of the deck shows its face value. This function will randomly take an element from the list named cards and return a list with a number.…