#coding:utf-8
import random

i = 0
list1 = []
while i <= 10:
    list1.append(random.randint(10, 100))
    i += 1
print(list1)

list1.sort()
print(list1)

list2 = range(0, 199, 2)

searchkey = int(input('Enter integer search key:'))

if searchkey in list2:
    print('found at index:', list2.index(searchkey))
else:
    print('value not found!')

 

end!

相关文章:

  • 2021-12-11
  • 2022-12-23
  • 2021-11-19
  • 2022-01-15
  • 2021-10-30
  • 2022-12-23
  • 2021-11-01
猜你喜欢
  • 2022-12-23
  • 2021-09-29
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2022-12-23
  • 2022-02-11
相关资源
相似解决方案