I want to remove the "." character. When I use this
text = "[email protected]"
text = (text.replace('.',' '))
head, sep, tail = text.partition('@')
print(head)
It works and this is the output: Rmyname lastname
But when load an external file and read every line, its doesnt replace the "." character.
with open('found.txt', 'r') as csvfile:
spamreader = csv.reader(csvfile)
for row in spamreader:
head = (row[0].replace('.', ' '))
head, sep, tail = row[0].partition('@')
print(head)
This is the output: Rmyname.lastname
How can i solve this?
row[0]would be value of the first column