Skip to content

Instantly share code, notes, and snippets.

@shamikalashawn
Created February 6, 2017 22:36
Show Gist options
  • Save shamikalashawn/498f0e3873c4ba5129fbc5f4fbb0842a to your computer and use it in GitHub Desktop.
Save shamikalashawn/498f0e3873c4ba5129fbc5f4fbb0842a to your computer and use it in GitHub Desktop.
A character is turned into a pyramid!
def advanced_nested_pyramid(start = 1, last = 5, char = '*'):
pyramid = ''
pylength = range(start, last+1)
for num in range(1):
for pynum in pylength:
pyramid = pyramid + char * pynum + '\n'
return pyramid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment