Skip to content

Instantly share code, notes, and snippets.

@cfjedimaster
Last active November 21, 2022 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cfjedimaster/2e6c3a61cb43a07b58a3a241133719e5 to your computer and use it in GitHub Desktop.
Save cfjedimaster/2e6c3a61cb43a07b58a3a241133719e5 to your computer and use it in GitHub Desktop.
def slashdraw(input):
height = 0
for char in input:
if char == "\\":
print(" "*height + char)
height = height + 1
else:
height = height - 1
print(" "*height + char)
slashdraw('\\\\\\//\\/\\\\')
print('------------------------')
slashdraw('\\\\\\\\')
print('------------------------')
slashdraw('\\/')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment