1 comment:

  1. def bs(a,t):
    b=a[0]
    s=a[0]
    for i in range(0,t):
    if a[i]>=b:
    b=a[i]
    elif a[i]<=s:
    s=a[i]
    print b
    print a.index(b)
    print s
    print a.index(s)
    mylist=[555,2,4,6,3,5,7,5,3,2,4,5,7,8,6,4,9,43,21,332,4,32,32,23]
    t=len(mylist)
    bs(mylist,t)
    555
    0
    2
    1

    ReplyDelete