Question: I have a MySQL table with 6 columns. Some of the columns contain long JSON strings that have newlines and spaces. When I list the content of the table with the SELECT statement, the output is very messy.

Is there a command (or default setting I can change), to limit the output of each column to the first few meaningful characters, so that each row will show as single line regardless of the cell content? Something like:

```
+---------------------------+-------------------------+---------+-----------+--------------+----------+
| jsondata                  | column2                 | column3 | column4   | column5      | column6  |
+---------------------------+-------------------------+---------+-----------+--------------+----------+
| { "Text":[{"user_id":"3","| ABCDEFABCDEFABCDEFABC   |       3 | ABCABCA   | txt          | { "email"|
+---------------------------+-------------------------+---------+-----------+--------------+----------+

```

Answer: 
You need to replace `L == int` and `L == str` (which will be always valuated to False) with the folowing:

```
all(isinstance(item, str) for item in L)  # L == str
all(isinstance(item, int) for item in L)  # L == int

```
You can try this: 

Have a function that checks if the elements inside is a number or a string.

```
def isNumber(s): # Helper function to check if it is a Number or a string
    try:
        float(s)
        return True
    except ValueError:
        return False

def find_index_of_min(L):
    """
    Parameter: a list L
    Returns: the index of the minimum element of the list
        (returns None if the list is empty)
    """

    if L == []:
        return None
    elif isNumber(L[0]):
        min = float('inf')
        for i in range(len(L)):
            if L[i] < min:
                min = L[i]
                min_index = i
        return min_index
    else:
        min = 'Z'
        for i in range(len(L)):
            if L[i] < min:
                min = L[i]
                min_index = i
        return min_index

import sys
import math

def main():
    """ Read and print a file's contents. """

    # filename = str(input('Name of input file: '))
    # string = readfile(filename)
    # print()
    # print('The original list of cities is:')
    # for i in range(len(string)):
    # print(i, ':', string[i], sep="")

    print(find_index_of_min([]))
    print(find_index_of_min([3, 2, 1, 0]))
    print(find_index_of_min(['A', 'Z', 'Y', 'B']))
    print(find_index_of_min(['B', 'A', 'Z', 'Y']))

main()

```