Вообщем в первом случае вылетает отшибка непонятная...

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import random
import new
element = input("Please input element for search: ")
l_sz = input ("Please enter the number of elements in an array: ")
drange = l_sz
#Start generate random list
from random import randrange
r_range=(0,drange)
randlist=[randrange(*r_range) for x in range(l_sz)]
#print it
print "---not Graded---"
for i in randlist:
print[i]
#--------------------------------------
def line_search(a, b):
print
for i in a:
print [i]
print element
if [i] == element:
print 'found'
else print 'not found'
line_search(randlist, element)
#-------------А тут все верно!---------------------------
b =10
x =10
if x == b:
print 'Negative changed to zero'