python split string in pairs

string = '1234567890'
n = 2	# every 2 characters
split_string = [string[i:i+n] for i in range(0, len(string), n)]
# split_string = ['12', '34', '56', '78', '90']

Here is what the above code is Doing:
1. The range(0, len(string), n) function returns a list of numbers from 0 to the length of the string, skipping every n characters.
2. The string[i:i+n] syntax extracts the substring starting at index i and ending at index i+n.
3. The for loop iterates over the list of numbers and extracts the substring for each number.
4. The list comprehension puts all the substrings into a list.