Hackerrank String Formatting solution in Python
In this HackerRank String Formatting problem solution in Python Given an integer, n, print the following values for each integer i from 1 to n: HackerRank String formatting solution in Python 2 programming. N = int(raw_input()) width = len(str(bin(N)))-2 for num in range(1,N+1): for base in ‘doXb’: print ‘{0:{width}{base}}’.format(num, base=base, width=width), print Problem solution in Python…
Learn More “Hackerrank String Formatting solution in Python” »