fork download
  1.  
  2. n=int(input())
  3. a=list(map(int,input().split()))
  4. odd=0;even=0
  5. for i in a:
  6. if i%2: odd=1
  7. else:even=1
  8. if odd and even:
  9. print(*sorted(a))
  10. else:print(*a)
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
3
1 4 7
compilation info
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/py_compile.py", line 117, in compile
    raise py_exc
py_compile.PyCompileError:   File "prog.py", line 9
    print(*sorted(a))
          ^
SyntaxError: invalid syntax

stdout
Standard output is empty