Python Forum
looking 4 py code: line up columns
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
looking 4 py code: line up columns
#6
i mean text data that may be numbers or may be words and names, more often the latter.  i want to line them up for printing.  here is a list states i have been in and their capitals, lined up, sorted by state and boxed:
Output:
+---<STDIN>-------------------+ | Arkansas       Little_Rock  | | Delaware       Dover        | | Illinois       Springfield  | | Indiana        Indianapolis | | Kentucky       Frankfort    | | New_Jersey     Trenton      | | New_York       Albany       | | North_Carolina Raleigh      | | Ohilo          Columbus     | | Pennsylvania   Harrisburg   | | South_Carolina Columbia     | | Texas          Austin       | | Virginia       Richmond     | | West_Virginia  Charleston   | +-----------------------------+
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
looking 4 py code: line up columns - by Skaperen - Jan-06-2017, 06:25 AM
RE: looking 4 py code: line up columns - by wavic - Jan-07-2017, 08:05 AM
RE: looking 4 py code: line up columns - by Skaperen - Jan-07-2017, 08:32 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  wanted: regex or code to find valide def statements in a line Skaperen 13 5,634 Mar-20-2020, 11:54 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