Skip to content

Instantly share code, notes, and snippets.

@shamikalashawn
Last active February 6, 2017 23:05
Show Gist options
  • Save shamikalashawn/5561247c59e8d0f711b05fbc623ca7d1 to your computer and use it in GitHub Desktop.
Save shamikalashawn/5561247c59e8d0f711b05fbc623ca7d1 to your computer and use it in GitHub Desktop.
A box of the character "*" is created using nested for loops.
def nested_box():
box = ''
for col in range(4):
if col == 0:
box = box
else:
box = box + '\n'
for row in range(4):
box = box + '*'
box = box + '\n'
return box
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment