Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Split and sort input file
#2
lines 9 and 10 are not part of the for loop, so the sort is only being performed on the final line. Indent them properly and it will work.
Reply


Messages In This Thread
Split and sort input file - by aawaleh - Apr-08-2020, 10:19 PM
RE: Split and sort input file - by TomToad - Apr-09-2020, 08:28 AM
RE: Split and sort input file - by aawaleh - Apr-09-2020, 08:27 PM
RE: Split and sort input file - by aawaleh - Apr-10-2020, 06:54 PM
RE: Split and sort input file - by aawaleh - Apr-10-2020, 09:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Sad How to split a String from Text Input into 40 char chunks? lastyle 7 1,166 Aug-01-2023, 09:36 AM
Last Post: Pedroski55
  How to "tee" (=split) output to screen and into file? pstein 6 1,409 Jun-24-2023, 08:00 AM
Last Post: Gribouillis
  Split pdf in pypdf based upon file regex standenman 1 2,106 Feb-03-2023, 12:01 PM
Last Post: SpongeB0B
Question Take user input and split files using 7z in python askfriends 2 1,112 Dec-11-2022, 07:39 PM
Last Post: snippsat
  How to sort .csv file test log which item first fail and paint color SamLiu 24 4,950 Sep-03-2022, 07:32 AM
Last Post: Pedroski55
  How to split the input taken from user into a single character? mHosseinDS86 3 1,189 Aug-17-2022, 12:43 PM
Last Post: Pedroski55
Photo a.sort() == b.sort() all the time 3lnyn0 1 1,328 Apr-19-2022, 06:50 PM
Last Post: Gribouillis
  Reading an Input File DaveG 1 1,261 Mar-27-2022, 02:08 AM
Last Post: deanhystad
  How to split file by same values from column from imported CSV file? Paqqno 5 2,810 Mar-24-2022, 05:25 PM
Last Post: Paqqno
  [split] Results of this program in an excel file eisamabodian 1 1,589 Feb-11-2022, 03:18 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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