I have written a python script which calls a function. This function takes 7 list as parameters inside the function, something like this:
def WorkDetails(link, A
You could use *args
if you don't need to use names for your lists:
def WorkDetails(link, *args):
if args[0] == ... # Same as if AllcurrValFound_bse == ...
...
# Call the function:
WorkDetails(link, AllcurrValFound_bse, AllyearlyHLFound_bse, AlldaysHLFound_bse, AllvolumeFound_bse, AllprevCloseFound_bse, AllchangePercentFound_bse, AllmarketCapFound_bs)
Or you could use a dictionary
def WorkDetails(link, dict_of_lists):
if dict_of_lists["AllcurrValFound_bse"] == ...
...
# Call the function
myLists = {
"AllcurrValFound_bse": AllcurrValFound_bse,
"AllyearlyHLFound_bse": AllyearlyHLFound_bse,
...,
...
}
WorkDetails(link, myLists)