# Assign list "time" with the following time values.
time = [15, 27, 32, 36.5, 38.5, 40.5, 41.5, 42, 43.5, 45.5, 47.5, 52.5]
# Remove 1st value(0) from the list
time[0] = []
# Show time
time
[[], 27, 32, 36.5, 38.5, 40.5, 41.5, 42, 43.5, 45.5, 47.5, 52.5]
# Print time
print(time)
[[], 27, 32, 36.5, 38.5, 40.5, 41.5, 42, 43.5, 45.5, 47.5, 52.5]
我只是跟随着什么教程教我至今:
http://docs.python.org/py3k/tutorial/introduction.html#listsPython - 如何完全清除列表中的整数?
这也会起作用,没有想到这一点。 – Josh 2011-02-08 04:34:45