# I want to eliminate a list from a bigger list, only by typing something #

tasks = [] 
task = [task1,year,month,day, hour, minute, second, microsecond,str(cuando),cuando]# this is a list that is filed into another list named tasks#

# If I type a position, I want to eliminate a complete list that is filed in tasks #

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

# the program asks if you finished any tasks# 

k = 0
while k < CantTareas :
    ans = raw_input ("Did you finished any task? (yes or no) ")
    if ans == "yes":
        k = k + 1
        position = input ("which number of task did you finished? ) "

suppose that I say I finished position 0

[["math",year,month,day, hour, minute, second, microsecond]#this is position 0
["biology",year,month,day, hour, minute, second, microsecond,str(cuando),cuando]]#This is position 1

I want the program to print only the task or tasks I didn't finish

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

Edited by pyTony: code format fix

4 Years
Discussion Span
Last Post by pyTony

I think it is too cumbersome for user to enter number of task, if you do not print the tasks with number before asking them. Do not use input in Python2 it is too dangerous, use int(raw_input("prompt"))

Edited by pyTony

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.