Advertisement
fkudinov

9. Non-unique Elements / Вирішуємо задачі на Python CheckIO Українською

Dec 7th, 2023
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | Source Code | 0 0
  1.  
  2. def checkio(data: list) -> list:
  3.     return
  4.  
  5.  
  6.  
  7. if __name__ == "__main__":
  8.     #These "asserts" using only for self-checking and not necessary for auto-testing
  9.     assert list(checkio([1, 2, 3, 1, 3])) == [1, 3, 1, 3], "1st example"
  10.     assert list(checkio([1, 2, 3, 4, 5])) == [], "2nd example"
  11.     assert list(checkio([5, 5, 5, 5, 5])) == [5, 5, 5, 5, 5], "3rd example"
  12.     assert list(checkio([10, 9, 10, 10, 9, 8])) == [10, 9, 10, 10, 9], "4th example"
  13.     print("It is all good. Let's check it now")
Tags: checkio
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement