Created
July 18, 2017 09:56
-
-
Save Nickikku/08246d63f8e12272dad47b128692b2f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#this function returns lenght of the string number of times of input string. If the string contains 3 characters, it will return | |
#character 1 + 1, 2 + 1, 2, 3 | |
def string_splosion(str): | |
a = '' | |
for i in range(len(str)): | |
a += str[:(i+1)] | |
return a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment