From a4fe8d519e38b2f4157df3e7b6a1e255478e38a1 Mon Sep 17 00:00:00 2001 From: marina <138340846+bt3gl-cryptographer@users.noreply.github.com> Date: Mon, 7 Aug 2023 17:34:32 -0700 Subject: [PATCH] Update and rename permutation.py to permutations.py --- arrays_and_strings/{permutation.py => permutations.py} | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) rename arrays_and_strings/{permutation.py => permutations.py} (61%) diff --git a/arrays_and_strings/permutation.py b/arrays_and_strings/permutations.py similarity index 61% rename from arrays_and_strings/permutation.py rename to arrays_and_strings/permutations.py index 51fefc9..f778c12 100644 --- a/arrays_and_strings/permutation.py +++ b/arrays_and_strings/permutations.py @@ -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)}')