Advertisement
Sabev

Odd Numbers at Odd Positions

Jan 13th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. list_numbers = list(map(int, input().split(' ')))
  2.  
  3. for index in range(0,len(list_numbers)):
  4.     num = list_numbers[index]
  5.     if index % 2 != 0 and num %2 != 0:
  6.         print(f"Index {index} -> {num}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement