Python List help

Let’s say I have a list: Python_list([1,3,4,5],2,6)
What do the numbers outside the brackets do?

they’re non list parameters, you can assign then in the function and are not part of the list parameter

def function(parameter,parameter,parameter):

remember that a parameter can be a list too, it just needs the brackets

def function([parameter, parameter, parameter]):

you use both in the same function as well

def function([parameter,parameter,parameter], parameter, parameter)

Hope this helps!

3 Likes