I am struggling to correctly strip all unnecessary whitespace from strings within a sublist. The syntax I have used is below, any review/comment will be greatly appreciated!
#first for loop is to iterate through complete daily transactions list
for transaction in daily_transactions_split:
#second for loop used to iterate through sub-lists
#will result in error if you try perform .strip on a list
#.strip needs to be performed on a string
for data in transaction:
for string in data:
When I print(transactions_clean) the white space is still present.
Thanks in advance!