Manually formatting numbers in Python
A few points:


Reversing the string m multiple times is unnecessary. Slicing can be done on the original string using correct indices. m[::-1][i:i+3][::-1] is equivalent to m[-i-3:len(m)-i]. Another approach is to traverse the indices in the reverse order for i in range(len(m)-1, -1, -3) and then perform slicing accordingly.
The logic can be simplified using str.join. m2.append(',') can be omitted. And you can just do

m3 = ','.join(m2[::-1])

Further improvements can be achieved by using list comprehensions and traversing the string from the beginning rather than in the reverse order. Some calculation for the indices are needed:

def formatting(n):
    m = str(n)  # Turn it into string
    num_digits = len(m)
    seg1_len = (num_digits % 3) or 3  # Calculate length of the first segment
    segments = [m[:seg1_len], *(m[i:i+3] for i in range(seg1_len, num_digits, 3))]
    return ','.join(segments)

Python 3's built-in formatting specification actually supports the thousands separator. So you can just do this to achieve the same functionality:

formatted_n = f"{n:,}"


Or equivalently:

formatted_n = "{:,}".format(n)