Skip to content

Instantly share code, notes, and snippets.

@goish135
Created August 22, 2021 04:54
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 goish135/f8ceeaddd0f2e9b265827b267ce5565a to your computer and use it in GitHub Desktop.
Save goish135/f8ceeaddd0f2e9b265827b267ce5565a to your computer and use it in GitHub Desktop.
'''
Ex:
talentsCount = 3
talent=[1,2,3,2,1]
'''
'''
talent=[1,2,3,2,1]
talentsCount = 3
'''
talent=[1,1,2,2,3,1,3,2]
talentsCount = 3
for i in range(len(talent)):
endpoint = 3
#while endpoint<=len(talent) and (i+endpoint)<=len(talent):
while (i+endpoint)<=len(talent):
#print(i," ",i+endpoint)
print(talent[i:i+endpoint])
endpoint+=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment