Complete the code to remove all occurrences of 'apple' from the list 'fruits'.
LREM fruits 0 [1]
The LREM command requires the element to be a string enclosed in quotes. Using single quotes around 'apple' is correct.
Complete the code to remove only the first occurrence of 'banana' from the list 'fruits'.
LREM fruits [1] "banana"
Using 1 as the count removes the first occurrence of the element.
Fix the error in the code to remove the last occurrence of 'orange' from the list 'fruits'.
LREM fruits [1] "orange"
Using -1 as the count removes the last occurrence of the element from the list.
Fill both blanks to remove two occurrences of 'grape' starting from the tail in the list 'fruits'.
LREM fruits [1] [2]
Count -2 removes two occurrences from tail to head. The element to remove is "grape".
Fill all three blanks to remove three occurrences of 'melon' starting from the head in the list 'fruits'.
LREM [1] [2] [3]
The command removes 3 occurrences of "melon" from the list named fruits starting from the head.