Skip to main content

Python 3, 80 78 bytes

Loop through the number of spaces to prefix with and then the number of characters to end with.

lambda x:[print(' '*i+x[i:j+1])for i in range(len(x))for j in range(i,len(x))]
lambda x:[print(' '*i+x[i:j+1])for i in range(len(x))for j in range(i,len(x))]

Edit: Removed spaces before the for loops.

Python 3, 80 78 bytes

Loop through the number of spaces to prefix with and then the number of characters to end with.

lambda x:[print(' '*i+x[i:j+1])for i in range(len(x))for j in range(i,len(x))]

Edit: Removed spaces before the for loops

Python 3, 80 78 bytes

Loop through the number of spaces to prefix with and then the number of characters to end with.

lambda x:[print(' '*i+x[i:j+1])for i in range(len(x))for j in range(i,len(x))]

Edit: Removed spaces before the for loops.

saved 2 bytes
Source Link
NonlinearFruit
  • 5.8k
  • 1
  • 29
  • 43

Python 3, 8080 78 bytes

Loop through the number of spaces to prefix with and then the number of characters to end with.

lambda x:[print(' '*i+x[i:j+1]) for i in range(len(x)) for j in range(i,len(x))]

Edit: Removed spaces before the for loops

Python 3, 80 bytes

Loop through the number of spaces to prefix with and then the number of characters to end with.

lambda x:[print(' '*i+x[i:j+1]) for i in range(len(x)) for j in range(i,len(x))]

Python 3, 80 78 bytes

Loop through the number of spaces to prefix with and then the number of characters to end with.

lambda x:[print(' '*i+x[i:j+1])for i in range(len(x))for j in range(i,len(x))]

Edit: Removed spaces before the for loops

Source Link
NonlinearFruit
  • 5.8k
  • 1
  • 29
  • 43

Python 3, 80 bytes

Loop through the number of spaces to prefix with and then the number of characters to end with.

lambda x:[print(' '*i+x[i:j+1]) for i in range(len(x)) for j in range(i,len(x))]