Advertisement
go6odn28

even_numbers

Feb 11th, 2024
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. number_list = [int(x) for x in input().split(", ")]
  2. print([idx for idx, number in enumerate(number_list) if number % 2 == 0])
  3.  
  4.  
  5. #2
  6. # number_list = list(map(int, input().split(', ')))
  7. #
  8. # even_indices = []
  9. #
  10. # for index, num in enumerate(number_list):
  11. #     if num % 2 == 0:
  12. #         even_indices.append(index)
  13. #
  14. # print(even_indices)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement