Forum Discussion

manuelaneena's avatar
manuelaneena
Occasional Contributor
6 years ago

appending values horizontally to a list

is there is a way to horizontally add items to a list.Normally it is added vertically.
  • manuelaneena's avatar
    manuelaneena
    6 years ago

    TanyaYatskovska 

    It was just a for loop.My requirement was to take out 4 values each from a list of 600+ values horizontally.I think I messed up  the question I asked here.Please find the code below.

    for m in range(0, (len(valueList)-1), 4):
    regexpattern=(".*")+re.escape(valueList[m])+(".*")+(valueList[m+1])+(".*")+re.escape(valueList[m+2])+(".*")+re.escape(valueList[m+3])+(".*")