Trying to solve the http://wiki.haskell.org/H-99:_Ninety-Nine_Haskell_Problems set of problems in Python programming language.
1- Find the last element of a list ✅
2- Find the last but one element of a list ✅
3- Find the K'th element of a list ✅
4- Find the number of elements of a list ✅
5- Reverse a list ✅
6- Find out whether a list is a palindrome ✅
7- Flatten a nested list structure ✅
8- Eliminate consecutive duplicates of list elements ✅
9- Pack consecutive duplicates of list elements into sublists ✅
10- Run-length encoding of a list ✅
11- Modified run-length encoding ✅
12- Decode a run-length encoded list ✅
13- Run-length encoding of a list(direct solution) ✅
14- Duplicate the elements of a list ✅
15- Duplicate the elements of a list a given number of times ✅
16- Drop every N'th element from a list ✅
17- Split a list into two parts, the length of the first part is given ✅
18- Extract a slice from a list ✅
19- Rotate a list N places to the left ✅
20- Remove the K'th element from a list ✅
21- Insert an element at a given position into a list ✅
22- Create a list containing all integers within a given range ✅
23- Extract a given number of randomly selected elements from a list ✅
24- Lotto: Draw N different random numbers from the set 1 ✅
25- Generate a random permutation of the elements of a list ✅
26- Generate the combinations of K distinct objects chosen from the N elements of a list ✅
27- Group the elements of a set into disjoint subsets - to be solved
28- Sorting a list of lists according to length of sublists ✅
31- Determine whether a given integer number is prime ✅
32- Calculate the Greatest Common Divisor (GCD) using Euclid's algorithm ✅
33- Determine if two numbers are coprime ✅
34- Calculate Euclid's totient function ✅
35- Determine prime factors of a number ✅
36- Determine prime factorization of a number
37- A more efficient totient function
38- Compare totient functions
39- Generate a list of primes in a given range
40- Goldbach Conjecture ✅
41- Print list of Goldbach compositions
46- Print a truth table for a logical expression of two variables
47- Print a truth table for an infix logical expression of two variables
48- Print truth table for logical infix expression having an arbitrary number of variables
49- Generate list of n-bit Gray codes-
50- Generate Huffman codes
54- Check whether a given expression represents a binary tree
55- Construct completely balanced binary trees
56- Symmetric binary trees
57- Binary search trees (dictionaries)
58- Generate-and-test paradigm
59- Construct height-balanced binary trees
60- Construct height-balanced binary trees with a given number of nodes
61- Count the leaves of a binary tree
61A- Collect the leaves of a binary tree in a list
62- Collect the internal nodes of a binary tree in a list
62B- Collect the nodes at a given level in a list
63- Construct a complete binary tree
64- Layout a binary tree (1)
65- Layout a binary tree (2)
66- Layout a binary tree (3)
67- A string representation of binary trees
68- Preorder and inorder sequences of binary trees
69- Dotstring representation of binary trees
70B- Check whether a given expression represents a multiway tree
70C- Count the odes of a multiway tree
70- Tree construction from a node string
71- Determine the internal path length of a tree
72- Construct the bottom-up order sequence of the tree nodes
73- Lisp-like tree representation
80- Conversions
81- Path from one node to another one
82- Cycle from a given node
83- Construct all spanning trees
84- Construct the minimal spanning tree
85- Graph isomorphism
86- Node degree and graph coloration
87- Depth-first order graph transversal
88- Connected components
89- Bipartite graphs
90- Eight queens problem ✅
91- Knight's tour ✅
92- Von Koch's conjecture
93- An arithmetic puzzle
94- Generate K-regular simple graphs with N nodes
95- English number words
96- Syntax checker
97- Sudoku ✅
98- Nonograms
99- Crossword puzzle
https://docs.python.org/3/library/itertools.html
https://wiki.python.org/moin/ProblemSets/99%20Prolog%20Problems%20Solutions
https://www.ic.unicamp.br/~meidanis/courses/mc336/problemas-lisp/L-99_Ninety-Nine_Lisp_Problems.html
https://www.ic.unicamp.br/~meidanis/courses/mc336/2009s2/prolog/problemas/