daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Jun 23rd, 2018 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. numbers = [1, 4, 6, 7, 90, 23, 56, 84, 93, 11, 21, 26, 48, 56, 72, 59, 12, 18, 86, 79, 48]
  2. def check(List, number):
  3.     dedup = []
  4.     for element in List:
  5.         if element not in dedup:
  6.             dedup.append(element)
  7.     dedup.sort()
  8.     if number in dedup:
  9.         return print(number," is in the list of numbers")
  10.     else:
  11.         return print(number," is not in the list of numbers")
  12. guess = int(input("Please insert a number you want to check against a list: "))
  13. check(numbers, guess)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top