Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Space in texte file
#2
because when you read from file, each line will have new-line at the end.
when you convert to int, this new-line is striped. but it's not stripped from the strings.
so you end-up with 2 new lines.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
Space in texte file - by Celonius - Nov-03-2020, 09:21 AM
RE: Space in texte file - by buran - Nov-03-2020, 10:05 AM
RE: Space in texte file - by Celonius - Nov-03-2020, 03:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  saving data from text file to CSV file in python having delimiter as space K11 1 2,548 Sep-11-2020, 06:28 AM
Last Post: bowlofred
  from global space to local space Skaperen 4 2,479 Sep-08-2020, 04:59 PM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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