+ - * /
are the symbols for addition, subtraction, multiplication, and divisionThis is a good time to introduce \"indexing\" lists in python, because eod_times is a list (with the earliest eod time in the first position of the list and the latest eod time in the last position of the list).
\n", "The following table shows, by example, how you would get the value at each position in a list (L) by indexing the list. In this example, the values in the list are t0, t1, t2.
\n", "If you type: | \n", "Then you will get: | \n", "Because... | \n", "
---|---|---|
L[2] | \n", "t2 | \n", "you are asking for an offset of 2 positions (start at zero) | \n", "
L[-2] | \n", "t1 | \n", "negative offsets count from the right | \n", "
L[1:] | \n", "[t1, t2] | \n", "a colon \"slices\" a list, which means it returns a section of the list (in this case, from position 1 until the end) | \n", "