Apr-04-2021, 10:02 AM
(This post was last modified: Apr-04-2021, 10:07 AM by danlopek14q.)
Hello guys
I have a problem finding a solution for the lists.
I have a function all_list which takes two parameters (listas, column[]). Inside of the column parameter User chooses to pass for example two values [0,1] , those numbers correspond to the element inside of the list which should be display. For example : all_list (['Mars','Hot',22,True],column[0,1]. The display values should be ['Mars','Hot'] if no column value then all list should be display like ['Mars','Hot',22,True]
I have a problem finding a solution for the lists.
I have a function all_list which takes two parameters (listas, column[]). Inside of the column parameter User chooses to pass for example two values [0,1] , those numbers correspond to the element inside of the list which should be display. For example : all_list (['Mars','Hot',22,True],column[0,1]. The display values should be ['Mars','Hot'] if no column value then all list should be display like ['Mars','Hot',22,True]
def all_list(listas,column[]): #for no columns value if column == []: print(listas) #how to do when user use [0,2]or [1,2] etc.