I am currently working on a script which sends out the list of defaulters to a distro. I have the values in python list like this ['person1@email.com','person2@email.com','person3@email.com']
I need to form a multiline string from the above array like this
""" 1. person1@email.com
2. person2@email.com
3. person3@email.com"""
I tried this
defaultersList = ['person1@email.com','person2@email.com','person3@email.com']
multilineStr = ""
for item in defaultersList:
multilineStr = multilineStr + '\n' + item
but out put doesnt come how I expected it to come. Its coming in single line with \n character