## Task:
You have to write a function `pattern` which returns the following Pattern (See Pattern & Examples) upto `n` number of rows. 

* Note: `Returning` the pattern is not the same as `Printing` the pattern.

### Rules/Note:
* If `n < 1` then it should return "" i.e. empty string.
* There are `no whitespaces` in the pattern.

### Pattern:

    (n)(n-1)(n-2)...4321
    (n)(n-1)(n-2)...432
    (n)(n-1)(n-2)...43
    (n)(n-1)(n-2)...4
    ...............
    ..............
    (n)(n-1)(n-2)
    (n)(n-1)
    (n)
    
### Examples:

* pattern(4):

      4321
      432
      43
      4
    
* pattern(11):

      1110987654321
      111098765432
      11109876543
      1110987654
      111098765
      11109876
      1110987
      111098
      11109
      1110
      11


~~~if-not:cfml
* Hint: Use \n in string to jump to next line
~~~
~~~if:cfml
* Hint: Use chr(10) in string to jump to next line
~~~

[List of all my katas]("http://www.codewars.com/users/curious_db97/authored")

Source: codewars | Difficulty: EASY
Tags: String algorithms

Ad-hoc

Starter code: def pattern(n):
	

Solutions:
def pattern(n):
	return '\n'.join([''.join([str(y) for y in range(n, x, -1)]) for x in range(n)])


def pattern(n):
	return '\n'.join([''.join(map(str, list(range(n, x, -1)))) for x in range(n)])


def pattern(n):
	return '\n'.join((''.join((str(i) for i in range(n, j, -1))) for j in range(n)))


def pattern(n):
	r = range(n, 0, -1)
	a = [str(i) for i in r]
	return '\n'.join((''.join(a[:i]) for i in r))


def pattern(n):
	s = ''
	for i in range(n):
		s += str(n)
		for ni in range(n - 1, i, -1):
			s += str(ni)
		if n - 1 == i:
			pass
		else:
			s += '\n'
	return s


def pattern(n):
	result = []
	for i in range(n, 0, -1):
		string = ''
		for j in range(n, n - i, -1):
			string += str(j)
		result.append(string)
	return '\n'.join(result)


def pattern(n):
	return '\n'.join((''.join(map(str, range(n, stop, -1))) for stop in range(n)))


pattern = lambda n: '\n'.join([''.join([str(n - x) for x in range(0, n - y)]) for y in range(0, n)])