#Reads a sequence of integers separated by spaces. This sequence #is read in as a single string and is then "split" into a list #of strings, which is finally converted into a list of integers def getList(): s = requestString("Type a list of integers separated by spaces.") l = s.split() for i in range(0, len(l)): l[i] = int(l[i]) return l #Reads a list of integers typed in by the user, followed by a single #integer that the user wants to search for. Then performs a linear #search on the list and prints whether the integer was found or not def search(): l = getList() x = requestInteger("Type an integer you want to search for.") found = 0 for y in l: if (x == y): found = 1 printNow(l) if(found): printNow("Found " + str(x)) else: printNow("Not Found " + str(x))