Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Python/24.Lexicographic Permutations/anju3999.py
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: | | | | | | | | | | |
Expand Down