From da11ece710950d9cbf22fba2566edb49220964b9 Mon Sep 17 00:00:00 2001 From: anju3999 <63450122+anju3999@users.noreply.github.com> Date: Thu, 1 Oct 2020 18:39:56 +0530 Subject: [PATCH 1/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b794d72..d1d6bd7 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Happy Contributing! 😃 | 21 | [Amicable numbers](https://projecteuler.net/problem=21) | | | | | | | | | | | | | | 22 | [Names scores](https://projecteuler.net/problem=22) | | | | :white_check_mark: | | | | | | | | | | 23 | [Non-abundant sums](https://projecteuler.net/problem=23) | | | | | | | | | | | | | -| 24 | [Lexicographic permutations](https://projecteuler.net/problem=24) | | | | | | | | | | | | | +| 24 | [Lexicographic permutations](https://projecteuler.net/problem=24) | | | | :white_check_mark: | | | | | | | | | | 25 | [1000-digit Fibonacci number](https://projecteuler.net/problem=25) | | | | :white_check_mark: | | | | | | | | | | 26 | [Reciprocal cycles](https://projecteuler.net/problem=26) | | | | | | | | | | | | | | 27 | [Quadratic primes](https://projecteuler.net/problem=27) | | :white_check_mark: | | | | | | | | | | | From 177c270632d9ece77d34f0b85ea999bc363bcbc9 Mon Sep 17 00:00:00 2001 From: anju3999 <63450122+anju3999@users.noreply.github.com> Date: Thu, 1 Oct 2020 18:41:35 +0530 Subject: [PATCH 2/2] Add files via upload --- Python/24.Lexicographic Permutations/anju3999.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Python/24.Lexicographic Permutations/anju3999.py diff --git a/Python/24.Lexicographic Permutations/anju3999.py b/Python/24.Lexicographic Permutations/anju3999.py new file mode 100644 index 0000000..7d34ee0 --- /dev/null +++ b/Python/24.Lexicographic Permutations/anju3999.py @@ -0,0 +1,10 @@ +#Euler 24 +from itertools import permutations + +def lexicographical_permutation(str): + permutation = sorted(''.join(chars) for chars in permutations(str)) + for x in permutation: + print(x) + +str = 'abc' +lexicographical_permutation(str) \ No newline at end of file