@@ -0,0 +1,780 @@
+import os, sys%0A%0Adef errorExit(msg):%0A    sys.stderr.write(msg)%0A    sys.exit(1)%0A%0Adef main():%0A    if len(sys.argv) != 3: %0A        errorExit(%22Usage: %7B%7D MAXLEN FILE%5Cn%22.format(os.path.basename(sys.argv%5B0%5D)))%0A    maxlen = int(sys.argv%5B1%5D)%0A    fileName = sys.argv%5B2%5D%0A    if not os.path.isfile(fileName):%0A        errorExit(%22%7B%7D does not exist, or is not a file%5Cn%22.format(fileName))%0A    deletedLines = 0%0A    with (open(fileName, 'rt')) as FILE:%0A            for line in FILE:%0A                items = line.split()%0A                if len(items) %3C= maxlen:%0A                    sys.stdout.write(line)%0A                else:%0A                    deletedLines += 1%0A    sys.stderr.write(%22%7B%7D: %7B%7D lines deleted.%5Cn%22.format(sys.argv%5B0%5D, deletedLines))%0A    return 0%0A%0Aif __name__ == %22__main__%22:%0A    main()%0A%0A

Add a Python script to delete long lines. We will use it for the Netflix data.