how do I get the upper and lower elements of an element in list? Thank you for your advice.
how do I get the upper and lower elements of an element in list? Thank you for your advice.
if you are using the index to locate the element, such as l [I]
, you should be able to get it via l [item1]
, l [I-1]
. If not, you can get the index first and then through the index.
if positioned by this element, pre, last = l [l.index (a)-1], l [l.index (a) + 1]
original page html code: <html xmlns="http: www.w3.org 1999 xhtml"> <head> <meta charset="utf-8" > <meta content="pdf2htmlEX" name="generator" > <meta content="IE=edge...