commit
8ff43fe33a
@ -0,0 +1,2 @@ |
|||||||
|
username.txt |
||||||
|
lib/__pycache__/ |
@ -0,0 +1,10 @@ |
|||||||
|
import sys |
||||||
|
|
||||||
|
def getValueOfKey(key): # get the value of an input key, example: -c {VALUE} |
||||||
|
for i in sys.argv: |
||||||
|
if( i == key ): |
||||||
|
return sys.argv[sys.argv.index(key) + 1] |
||||||
|
return -1 # if no value was found return -1 |
||||||
|
|
||||||
|
def inputHasKeys(keyList): |
||||||
|
return all(key in sys.argv for key in keyList) |
@ -0,0 +1,17 @@ |
|||||||
|
eng_alphabet = *"abcdefghijklmnopqrstuvwxyz", |
||||||
|
swe_alphabet = *"abcdefghijklmnopqrstuvwxyzåäö", |
||||||
|
|
||||||
|
# Definitions |
||||||
|
alphabet = dict() |
||||||
|
|
||||||
|
alphabet["ENG"] = eng_alphabet |
||||||
|
alphabet["SWE"] = swe_alphabet |
||||||
|
|
||||||
|
# Functions |
||||||
|
def listToString( l ): |
||||||
|
returnStr = "" |
||||||
|
|
||||||
|
for char in l: |
||||||
|
returnStr += char |
||||||
|
|
||||||
|
return returnStr |
Loading…
Reference in new issue