classification
Title: .sort() Causing Strings to Be Listed on the same line
Type: behavior Stage: resolved
Components: IDLE Versions: Python 3.4
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Hassan Mahroof, SilentGhost
Priority: normal Keywords:

Created on 2016-01-06 21:33 by Hassan Mahroof, last changed 2016-01-06 22:01 by SilentGhost. This issue is now closed.

Files
File name Uploaded Description Edit
SortFile2.py Hassan Mahroof, 2016-01-06 21:33 This is the Code I am having problems with (hopefully is isn't my code)
Messages (2)
msg257644 - (view) Author: Hassan Mahroof (Hassan Mahroof) Date: 2016-01-06 21:33
I am a student @ Burnley College and we were learning how to use the .write(), .close(), .readlines() and .sort().

I have a list of names within a text file which I am trying sort, These are random names generated using my Random Mind. However, when the sorted text file is created, what seems to be under certain circumstances with my list only (or words similar, This bug did not occur within my whole class till I stumbled upon it) it seems to instead of writing each term to seperate lines, it seems to connect two of the words (in this case names) on the same line. I have tried to find a pattern in this madness however being the rookie student I am I can only seem to break things aha. I have attached the 2 files which I am using and Hopefully someone can correct this cause I am confused.

This is a list of the names:
Robertas
Hassan
Bob
Connor
Camera
Billy
Maz
Richard
Mo
msg257648 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2016-01-06 22:01
Please use stackoverflow or python-tutor list to get help on this.
https://mail.python.org/pipermail/tutor/

What it looks like is the problem with your text editor not being able to support EOL characters from a different OS.
History
Date User Action Args
2016-01-06 22:01:53SilentGhostsetstatus: open -> closed

nosy: + SilentGhost
messages: + msg257648

resolution: not a bug
stage: resolved
2016-01-06 21:33:53Hassan Mahroofcreate