Update and rename permutation.py to permutations.py

This commit is contained in:
marina 2023-08-07 17:34:32 -07:00 committed by GitHub
parent 0b6dbbaa27
commit a4fe8d519e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,7 @@
# author: bt3gl
def permutation(string) -> list:
def permutations(string) -> list:
if len(string) == 1:
return [string]
@ -14,9 +14,3 @@ def permutation(string) -> list:
result += [char + perm]
return result
if __name__ == '__main__':
print('Testing permutation()...')
string = "bt3gl"
print(f'Permutation of {string}: {permutation(string)}')