Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. class Solution:
  2. def search(self, nums, target):
  3. """
  4. :type nums: List[int]
  5. :type target: int
  6. :rtype: int
  7. """
  8. if nums.count(target) > 0:
  9. return nums.index(target)
  10. else:
  11. return -1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement