Brief
=====
In this easy kata your function has to take a **string** as input and **return a string** with everything removed (*whitespaces* included) but the **digits**. As you may have guessed **empty strings** are to be returned as they are & if the input string contains no digits then the output will be an **empty string**.By the way , you have to watch out for **non-string** inputs too.Return **'Invalid input !'** for them.    

Hint
====
If you're writing more than 1 line of code, then think again! ;)   
Good luck!

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Starter code: def digit_all (x):
	

Solutions:
def digit_all(x):
	return filter(str.isdigit, x) if isinstance(x, str) else 'Invalid input !'


import re

def digit_all(x):
	return re.sub('\\D', '', x) if type(x) is str else 'Invalid input !'


def digit_all(x):
	if type(x).__name__ != 'str':
		return 'Invalid input !'
	return ''.join((c for c in x if c in '123456789'))


import re

def digit_all(x):
	try:
		return re.sub('[^\\d]*', '', x)
	except:
		return 'Invalid input !'


import re

def digit_all(x):
	if not isinstance(x, str):
		return 'Invalid input !'
	regex = re.compile('[^0-9]')
	return re.sub(regex, '', x)


def digit_all(x):
	if not isinstance(x, str):
		return 'Invalid input !'
	return ''.join(filter(str.isdigit, x))


import re

def digit_all(x):
	try:
		return re.sub('[\\D]', '', x)
	except TypeError:
		return 'Invalid input !'


def digit_all(x):
	if isinstance(x, str):
		return ''.join((x for x in x if x.isnumeric()))
	else:
		return 'Invalid input !'