fork download
  1. l=[5,4,8,7,10,6,1,3,2,11,15]
  2. s=[]
  3. for i in range(len(l)//2):
  4. s.append(l[i]) # append some small value
  5. s.append(l[-i -1]) # append some large value
  6. if len(l)%2:
  7. s.append(l[len(l)//2]) # for array with odd length
  8. print(s)
  9.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Traceback (most recent call last):
  File "/usr/lib/python3.5/py_compile.py", line 125, in compile
    _optimize=optimize)
  File "<frozen importlib._bootstrap_external>", line 735, in source_to_code
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "./prog.py", line 5
    s.append(l[-i -1])    # append some large value
                                                  ^
IndentationError: unindent does not match any outer indentation level

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.5/py_compile.py", line 129, in compile
    raise py_exc
py_compile.PyCompileError: Sorry: IndentationError: unindent does not match any outer indentation level (prog.py, line 5)
stdout
Standard output is empty