Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
change a text file
#1
Hello,
I have a text file that is full of emails. Their are many rows and columns of them.
I want to just have a list one email on a line. Can that be done with python.
I am using windows notepad and python 3.6.
The photo be low it what it looks like now.
I want to be able to have each one the the email on its own line.

[Image: email_test.png]

Shy I hope someone know how to do this.
Thank you
Renny
Reply
#2
Is there no seperation between each eamil address?
Reply
#3
ok thanks
Reply
#4
(Aug-03-2020, 08:34 PM)Yoriz Wrote: Is there no seperation between each eamil address?

(Aug-03-2020, 09:12 PM)Blue Dog Wrote: ok thanks

Huh
Reply
#5
Another way to put what Yoriz is asking: how do you tell when one address ends and the next begins? Also, do you really have more than one address in there? All the text looks the same to me..
Reply
#6
I guess there are 0-bytes between the addresses or other control characters.
Just open the file in binary mode and read the first 20 bytes.
Then you'll see if there is a separator between the e-mail addresses or not.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  logging: change log file permission with RotatingFileHandler erg 0 954 Aug-09-2023, 01:24 PM
Last Post: erg
  How can I change the uuid name of a file to his original file? MaddoxMB 2 868 Jul-17-2023, 10:15 PM
Last Post: Pedroski55
  unittest generates multiple files for each of my test case, how do I change to 1 file zsousa 0 918 Feb-15-2023, 05:34 PM
Last Post: zsousa
Thumbs Up Need to compare the Excel file name with a directory text file. veeran1991 1 1,061 Dec-15-2022, 04:32 PM
Last Post: Larz60+
  ANSI not working for change of text colors BliepMonster 10 3,245 Nov-10-2022, 09:28 AM
Last Post: BliepMonster
  find some word in text list file and a bit change to them RolanRoll 3 1,482 Jun-27-2022, 01:36 AM
Last Post: RolanRoll
  Modify values in XML file by data from text file (without parsing) Paqqno 2 1,575 Apr-13-2022, 06:02 AM
Last Post: Paqqno
  Converted Pipe Delimited text file to CSV file atomxkai 4 6,840 Feb-11-2022, 12:38 AM
Last Post: atomxkai
  Change Text Size in Console? ShakeyPakey 9 11,001 Dec-09-2021, 02:51 AM
Last Post: drvlwho
Photo (Beginners problem) Does file change during this code? fiqu 3 1,849 Nov-03-2021, 10:23 PM
Last Post: bowlofred

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020