I was wondering how I could align every item in one list, to the corresponding index in the second list. Here is my code so far:
letters=['a','ab','abc','abcd','abcde','abcdef','abcdefg','abcdefgh','abcdefghi','abcdefghij'] numbers=[1,2,3,4,5,6,7,8,9,10] for x in range(len(letters)): print letters[x]+"----------",numbers[x] This is the output I get:
a---------- 1 ab---------- 2 abc---------- 3 abcd---------- 4 abcde---------- 5 abcdef---------- 6 abcdefg---------- 7 abcdefgh---------- 8 abcdefghi---------- 9 abcdefghij---------- 10 This is the output I want:
a---------- 1 ab--------- 2 abc-------- 3 abcd------- 4 abcde------ 5 abcdef----- 6 abcdefg---- 7 abcdefgh--- 8 abcdefghi-- 9 abcdefghij- 10