position = 0
tasks = []
task = [task1,year,month,day, hour, minute, second, microsecond,str(cuando),cuando]# this is a list that is filed into another list#
while k < CantTareas :
    ans = raw_input ("did you finish any of your tasks? (yes or no) ")
    if ans == "yes":
        k = k + 1
        position = input ("which task position did you finish? ")
        print "the task that you finished is : ",tasks [position] [0],
        tasks [posicion][0]= "finished"
        taskList = '\n'.join(str(tarea) for tarea in tareas)
        print taskList ,  "define una lista "
    else:
        taskstoGo = '\n'.join(str(task) for task in tasks)
    # instead of printing finished on the list I want to eliminate it from the list. #  
the program prints
[["math",year,month,day, hour, minute, second, microsecond,str(cuando),cuando]
    [finished,year,month,day, hour, minute, second, microsecond,str(cuando),cuando]
if you type yes, I want it to print only:

[["math",year,month,day, hour, minute, second, microsecond,str(cuando),cuando]]

>>> lst = [[1,2,3], [4,5,6]]
>>> del lst[1]
>>> lst
[[1, 2, 3]]

>>> lst = [[1,2,3], [4,5,6]]
>>> lst.remove(lst[1])
>>> lst
[[1, 2, 3]]

>>> lst = [[1,2,3], [4,5,6]]
>>> lst.pop(1)
[4, 5, 6]
>>> lst
[[1, 2, 3]]
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.