Skip to content

Instantly share code, notes, and snippets.

@boxmein
Created December 24, 2015 18:11
Show Gist options
  • Save boxmein/86f146986d3a55cc39ef to your computer and use it in GitHub Desktop.
Save boxmein/86f146986d3a55cc39ef to your computer and use it in GitHub Desktop.
from your input, generates a square with offset letters
#!/usr/bin/env python3
# weird script
import sys
inp = input("> ")
sep = ' '
for i in range(len(inp)):
print(sep.join(inp[i:]) + sep + sep.join(inp[0:i]))
# box2@box:~ $ python3 Desktop/untitled.py
# > VAPORWAVE
# V A P O R W A V E
# A P O R W A V E V
# P O R W A V E V A
# O R W A V E V A P
# R W A V E V A P O
# W A V E V A P O R
# A V E V A P O R W
# V E V A P O R W A
# E V A P O R W A V
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment