Sort a List of a Tuple.. of a list. Case insensitive
<p>So what I have currently is a string that looks like this, </p>

<pre><code>hello here, hello there, hello Everywhere
</code></pre>

<p>I'm making a iteration of kwic if anyone knows what that is. The format that is required is a list of tuples.. of list while sorting case insensitive. So in the end I have a unsorted list that looks like</p>

<pre><code>(['here,', 'hello', 'there,', 'hello', 'Everywhere', 'hello'], 0)
(['hello', 'there,', 'hello', 'Everywhere', 'hello', 'here,'], 0)
(['there,', 'hello', 'Everywhere', 'hello', 'here,', 'hello'], 0)
(['hello', 'Everywhere', 'hello', 'here,', 'hello', 'there,'], 0)
(['Everywhere', 'hello', 'here,', 'hello', 'there,', 'hello'], 0)
(['hello', 'here,', 'hello', 'there,', 'hello', 'Everywhere'], 0)`
</code></pre>

<p>Currently I am using a python sort like </p>

<pre><code>Final_Array.sort(key = lambda a: a[0][0].lower())
</code></pre>

<p>But that gives me a sorted list that looks like </p>

<pre><code>(['Everywhere', 'hello', 'here,', 'hello', 'there,', 'hello'], 0)
(['hello', 'there,', 'hello', 'Everywhere', 'hello', 'here,'], 0)
(['hello', 'Everywhere', 'hello', 'here,', 'hello', 'there,'], 0)
(['hello', 'here,', 'hello', 'there,', 'hello', 'Everywhere'], 0)
(['here,', 'hello', 'there,', 'hello', 'Everywhere', 'hello'], 0)
(['there,', 'hello', 'Everywhere', 'hello', 'here,', 'hello'], 0)`
</code></pre>

<p>Obviously the <code>hello Everywhere</code> should be before the <code>hello there</code>, along with <code>hello here</code>.
It's sorting based on sending the first word  of the accessed list to lower, but I need it to sort and compare all entries of the accessed list so that there if there is a tie it just keeps comparing the next value in the array and the next, all while ignoring case.</p>

<pre><code>Final_Array.sort(key=lambda x: list(map(str.lower, x[0])))
</code></pre>

python