@@ -0,0 +1,1237 @@
+#!/usr/bin/env python3.6%0A# -*- coding: utf-8 -*-%0A%22%22%22Jerod Gawne, 2017-10-%0A%0AString Formatting%0A%0Ahttps://www.hackerrank.com/challenges/python-string-formatting/%0A%0AEditorial:%0A -%0A%0ASample Input:%0A17%0A%0ASample Output:%0A    1     1     1     1%0A    2     2     2    10%0A    3     3     3    11%0A    4     4     4   100%0A    5     5     5   101%0A    6     6     6   110%0A    7     7     7   111%0A    8    10     8  1000%0A    9    11     9  1001%0A   10    12     A  1010%0A   11    13     B  1011%0A   12    14     C  1100%0A   13    15     D  1101%0A   14    16     E  1110%0A   15    17     F  1111%0A   16    20    10 10000%0A   17    21    11 10001%0A%22%22%22%0A%0A%0Adef print_formatted(number):%0A    %22%22%22%0A%0A    :param number:%0A    :return:%0A    %22%22%22%0A    data = %5B%5D%0A    for i in range(1, number+1):%0A        data.append(%5Bstr(i), str(oct(i))%5B2:%5D, str(hex(i))%5B2:%5D, str(bin(i))%5B2:%5D%5D)%0A%0A    width = max(len(word) for row in data for word in row) + 2%0A    for row in data:%0A        print(''.join(word.rjust(width) for word in row))%0A%0A%0Adef main():%0A    %22%22%22%0A    Main/Tests%0A    %22%22%22%0A    n = int(input())%0A    print_formatted(n)%0A%0A%0Aif __name__ == '__main__':%0A    try:%0A        main()%0A    except Exception:%0A        import sys%0A        import traceback%0A%0A        print(traceback.print_exception(*sys.exc_info()))%0A

add 10_string-formatting.py