align on char

J

John Hunter

Suppose you have a sequence of strings, all known to have at least one
occurance of char

lines = (
'user1 : John Hunter',
'another user : Bill Bragg',
'yet on more : Hi There',
)

what is the best / easiest / most elegant way of producing this?

aligned = (
'user1 : John Hunter',
'another user : Bill Bragg',
'yet on more : Hi There',
)

Thanks!
JDH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top