From 4bebd07e825a7e77edd386d118b805f3334c0df7 Mon Sep 17 00:00:00 2001 From: Les De Ridder Date: Thu, 23 Feb 2017 19:09:48 +0100 Subject: [PATCH] Input data: part 1 --- input.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 input.py diff --git a/input.py b/input.py new file mode 100755 index 0000000..a41b7f8 --- /dev/null +++ b/input.py @@ -0,0 +1,20 @@ +#!/usr/bin/python3 + +import sys + +filename = sys.argv[1] + +print(filename) + +with open(filename) as file: + text = file.readlines() + +tokenised = [line.strip().split() for line in text] + +videoCount = tokenised[0][0] +endpointCount = tokenised[0][1] +requestDescriptionCount = tokenised[0][2] +cacheCount = tokenised[0][3] +cacheSize = tokenised[0][4] + +print(videoCount)