When dealing with lists if I want to assign a new variable for a specific element in a list I do this
new_variable = listname
If I want to remove an item from a list I do
Is there a reason why we use square brackets for the first task and parentheses for the second? In both we’re specifying the element we want to do something with.
The answer is probably straightforward and obvious but I’m fairly new to this and I wondered if there was an easy to remember rule so I know which to use.
Thanks in advance