Given the current exchange rate between the USD and the EUR is 1.1363636 write a function that will accept the Curency type to be returned and a list of the amounts that need to be converted.

Don't forget this is a currency so the result will need to be rounded to the second decimal. 

'USD' Return format should be `'$100,000.00'`

'EUR' Return format for this kata should be `'100,000.00€'`

`to_currency` is a string with values `'USD','EUR'` , `values_list` is a list of floats

`solution(to_currency,values)`


#EXAMPLES: 

```
solution('USD',[1394.0, 250.85, 721.3, 911.25, 1170.67]) 
= ['$1,584.09', '$285.06', '$819.66', '$1,035.51', '$1,330.31']

solution('EUR',[109.45, 640.31, 1310.99, 669.51, 415.54]) 
= ['96.32€', '563.47€', '1,153.67€', '589.17€', '365.68€']



```

Source: codewars | Difficulty: EASY
Tags: Fundamentals

String algorithms

Mathematics

Matrices

Data structures

Starter code: def solution(to_cur,value):
	

Solutions:
def solution(to, lst):
	(dolSym, eurSym, power) = ('', '€', -1) if to == 'EUR' else ('$', '', 1)
	return [f'{dolSym}{v * 1.1363636 ** power:,.2f}{eurSym}' for v in lst]


def solution(to_cur, values):
	(rate, fmt) = {'USD': (1.1363636, '${:,.2f}'), 'EUR': (1 / 1.1363636, '{:,.2f}€')}[to_cur]
	values = [v * rate for v in values]
	return list(map(fmt.format, values))


def solution(to_cur, values):
	rate = 1.1363636
	style = '{:,.2f}'
	if to_cur == 'EUR':
		rate = 1 / rate
		style += '€'
	else:
		style = '$' + style
	return [style.format(v * rate) for v in values]


def solution(to_cur, lst):
	(rate, fmt) = {'USD': (1.1363636, '${:,.2f}'), 'EUR': (0.88, '{:,.2f}€')}[to_cur]
	return [fmt.format(val * rate) for val in lst]


def solution(to_cur, value):
	mon = {'EUR': lambda e: '{:,.2f}€'.format(e / 1.1363636), 'USD': lambda e: '${:,.2f}'.format(e * 1.1363636, 2)}
	return [mon[to_cur](e) for e in value]


def solution(to_cur, values):
	return [f'${v * 1.1363636:0,.2f}' if to_cur == 'USD' else f'{v / 1.1363636:0,.2f}€' for v in values]


def solution(to_cur, value):
	return ['${:,.2f}'.format(x * 1.1363636) if to_cur == 'USD' else '{:,.2f}€'.format(x / 1.1363636) for x in value]


def solution(to_cur, value):
	rate = 1.1363636
	return list([f'${x * rate:,.2f}' for x in value]) if to_cur == 'USD' else list([f'{x / rate:,.2f}€' for x in value])


def solution(to_cur, value):
	return [f'${i * 1.1363636:,.2f}' if to_cur == 'USD' else f'{i / 1.1363636:,.2f}€' for i in value]


def solution(to_cur, value):
	r = []
	for number in value:
		if to_cur == 'USD':
			r.append('${:,.2F}'.format(number * 1.1363636))
		else:
			r.append('{:,.2F}€'.format(number / 1.1363636))
	return r