我怎么能在python中做这样的事情?
foo = somevalue previous = next = 0 for (i=1; i<objects.length(); i++) { if (objects[i]==foo){ previous = objects[i-1] next = objects[i+1] } }
python loops
loops ×1
python ×1