fork download
  1. def main():
  2.  
  3. arr = [23, 14, 20, 16, 23, 1, 2, 14, 20, 5, 16, -1]
  4.  
  5. n = len(arr)
  6.  
  7. for i in range(0, n - 1):
  8. if arr[i]:
  9. print(arr[i], end = " ")
  10. for j in range(i + 1, n):
  11. if arr[i] == arr[j]:
  12. arr[j] = 0
  13. if arr[n-1]:
  14. print(arr[n-1])
  15. main()
  16.  
Success #stdin #stdout 0.04s 9048KB
stdin
Standard input is empty
stdout
23 14 20 16 1 2 5 -1