My objective is to search a small csv file (one column, a few hundred rows) for a value.  The rows in the csv are all numbers.  Here is my attempt:

import csv

#read csv file
csv_reader = csv.reader(open('test.csv', 'rU'))

length_list = len(list(csv_reader))
value = []

for line in csv_reader:
    value.append(line) #transfer contents of csv to list

def find_voucher(input_voucher, counter):
    while counter &lt; length_list:
        check_voucher = input_voucher in value[counter]
        if check_voucher == True:
            print "TRUE"
        else:
            print "FALSE"
    counter = counter + 1
find_voucher(1000,1)


When I run the script I get this error:

check_voucher = input_voucher in value[counter]
IndexError: list index out of range



Question: hide javascript/jquery scripts from html page?
Answer: You can't hide the code, JavaScript is interpreted on the browser. The browser must parse and execute the code.

You may want to obfuscate/minify your code.

Recommended resources:


CompressorRater
YUI Compressor
JSMin


Keep in mind, the goal of JavaScript minification reduce the code download size by removing comments and unnecessary whitespaces from your code, obfuscation also makes minification, but identifier names are changed, making your code much more harder to understand, but at the end obfuscation gives you only a false illusion of privacy.