Python Forum
Writing string to file results in one character per line
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Writing string to file results in one character per line
#4
(Sep-27-2022, 01:22 PM)RB76SFJPsJJDu3bMnwYM Wrote: Worked like a charm. Thanks for the quick reply. I keep tacking on ; out of habit, since a few other languages I used require them and Python doesn't complain.

No worries; pleased that it worked for you.

Yes, I know 'old habits die hard'. I found it difficult to break the habit of parenthesising a function return, as I used to do with c, but I've kicked it now Cool
Sig:
>>> import this

The UNIX philosophy: "Do one thing, and do it well."

"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse

"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
Reply


Messages In This Thread
RE: Writing string to file results in one character per line - by rob101 - Sep-27-2022, 01:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Writing a Linear Search algorithm - malformed string representation Drone4four 10 1,130 Jan-10-2024, 08:39 AM
Last Post: gulshan212
  Updating sharepoint excel file odd results cubangt 1 950 Nov-03-2023, 05:13 PM
Last Post: noisefloor
  Need to replace a string with a file (HTML file) tester_V 1 815 Aug-30-2023, 03:42 AM
Last Post: Larz60+
  File "<string>", line 19, in <module> error is related to what? Frankduc 9 12,757 Mar-09-2023, 07:22 AM
Last Post: LocklearSusan
  Getting last line of each line occurrence in a file tester_V 1 916 Jan-31-2023, 09:29 PM
Last Post: deanhystad
  Trying to send file to printer with no results. chob_thomas 2 3,488 Dec-21-2022, 07:12 AM
Last Post: Pedroski55
  Inserting line feeds and comments into a beautifulsoup string arbiel 1 1,236 Jul-20-2022, 09:05 AM
Last Post: arbiel
  Writing to json file ebolisa 1 1,064 Jul-17-2022, 04:51 PM
Last Post: deanhystad
  Writing to External File DaveG 9 2,608 Mar-30-2022, 06:25 AM
Last Post: bowlofred
  Print to a New Line when Appending File DaveG 0 1,254 Mar-30-2022, 04:14 AM
Last Post: DaveG

Forum Jump:

User Panel Messages

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