# Task
 You are given a decimal number `n` as a **string**. Transform it into an array of numbers (given as **strings** again), such that each number has only one nonzero digit and their sum equals n.

 Each number in the output array should be written without any leading and trailing zeros.

# Input/Output


 - `[input]` string `n`

 A non-negative number.
 
 `1 ≤ n.length ≤ 30.`


 - `[output]` a string array

  Elements in the array should be sorted in descending order.


# Example

 For `n = "7970521.5544"` the output should be:
 ```
 ["7000000", 
 "900000", 
 "70000", 
 "500", 
 "20", 
 "1", 
 ".5",
 ".05",
 ".004",
 ".0004"]
  ```
 For `n = "7496314"`, the output should be:
 ```
 ["7000000", 
 "400000", 
 "90000", 
 "6000", 
 "300", 
 "10", 
 "4"]
```

 For `n = "0"`, the output should be `[]`

Source: codewars | Difficulty: EASY

Starter code: def split_exp(n):
	

Solutions:
def split_exp(n):
	dot = n.find('.')
	if dot == -1:
		dot = len(n)
	return [d + '0' * (dot - i - 1) if i < dot else '.{}{}'.format('0' * (i - dot - 1), d) for (i, d) in enumerate(n) if i != dot and d != '0']


def split_exp(n):
	j = n.find('.') + 1 or len(n) + 1
	return [f"{c}{'0' * (j - i - 2)}" if i < j else f".{'0' * (i - j)}{c}" for (i, c) in enumerate(n) if c not in '0.']


def split_exp(n):
	d = n.split('.')
	result = [c + '0' * (len(d[0]) - i - 1) for (i, c) in enumerate(d[0]) if c != '0']
	if len(d) == 2:
		result += ['.' + '0' * i + c for (i, c) in enumerate(d[1]) if c != '0']
	return result


def split_exp(n):
	(integer, decimal) = n.split('.') if '.' in n else (n, '')
	length = len(integer)
	result = [d.ljust(length - i, '0') for (i, d) in enumerate(integer) if int(d)]
	if decimal:
		result.extend(('.' + d.rjust(i, '0') for (i, d) in enumerate(decimal, 1) if int(d)))
	return result


split_exp = lambda n: (lambda d: [('.' + '0' * (i - d - 1) + x, x + '0' * (d - i - 1))[d > i] for (i, x) in enumerate(n) if x not in '.0'])((len(n), n.find('.'))['.' in n])


def split_exp(n):
	try:
		dot = n.index('.')
	except:
		dot = len(n)
	return [n[i] + '0' * (dot - 1 - i) for i in range(dot) if n[i] != '0'] + ['.' + '0' * (i - dot - 1) + n[i] for i in range(dot + 1, len(n)) if n[i] != '0']


def split_exp(n):
	return [y.ljust(len(x) - j, '0') if i == 0 else '.' + y.zfill(j + 1) for (i, x) in enumerate(n.split('.')) for (j, y) in enumerate(x) if y != '0']


def split_exp(n):
	o = n.index('.') if '.' in n else len(n)
	split = lambda i, c: '{}{}{}'.format('' if o - i > 0 else '.{}'.format('0' * -(o - i + 1)), c, '0' * (o - i - 1))
	return [split(i, c) for (i, c) in enumerate(n) if i - o != 0 if float(split(i, c)) != 0]


split_exp = lambda n: (lambda d: [e + '0' * (d - i - 1) if d > i else '.' + '0' * (i - d - 1) + e for (i, e) in enumerate(n) if e not in '.0'])(n.index('.') if '.' in n else len(n))


import re

def split_exp(n):
	r = [n[0:i + 1] + re.sub('\\.0+$', '', re.sub('\\d', '0', n[i + 1:])) for i in range(len(n))]
	r = [re.sub('\\d(?!$)', '0', re.sub('.+(?=\\.)|0+$', '', x)) if '.' in x else re.findall('\\d0*$', x)[0] for x in r]
	rs = []
	for x in r:
		if not (re.match('^[0.]+$', x) or x in rs):
			rs.append(x)
	return rs