Skip to content

Instantly share code, notes, and snippets.

@darkowlzz
Created August 25, 2012 05:40
Show Gist options
  • Save darkowlzz/3461300 to your computer and use it in GitHub Desktop.
Save darkowlzz/3461300 to your computer and use it in GitHub Desktop.
l = 'XYZ'
def pandovan(n):
p = []
for i in range(0,n):
if i<3:
p.append(l[i])
else:
p.append(p[i-2] + p[i-3])
str = p[n-2] + p[n-3]
print str
pandovan(6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment