## Description
Your job is to create a simple password validation function, as seen on many websites. 

The rules for a valid password are as follows:
- There needs to be at least 1 uppercase letter.
- There needs to be at least 1 lowercase letter.
- There needs to be at least 1 number.
- The password needs to be at least 8 characters long.

You are permitted to use any methods to validate the password.

## Examples:

### Extra info
- You will only be passed strings.
- The string can contain any standard keyboard character.
- Accepted strings can be any length, as long as they are 8 characters or more.

Difficulty: EASY
Starter code: def password(string):
	

Solutions:
CRITERIA = (str.islower, str.isupper, str.isdigit)

def password(s):
	return len(s) > 7 and all((any(map(f, s)) for f in CRITERIA))


import re

def password(s):
	return bool(re.match('(?=.*[A-Z])(?=.*[a-z])(?=.*\\d).{8}', s))


import re

def password(string):
	patterns = ('[A-Z]', '[a-z]', '[0-9]', '.{8,}')
	return all([re.search(pattern, string) for pattern in patterns])


def password(candidate):
	if not len(candidate) >= 8:
		return False
	if not any((char.islower() for char in candidate)):
		return False
	if not any((char.isupper() for char in candidate)):
		return False
	if not any((char.isdigit() for char in candidate)):
		return False
	return True


def password(string):
	if len(string) >= 8:
		check = 0
		for c in string:
			if c.isupper():
				check |= 1
			elif c.islower():
				check |= 2
			elif c.isdigit():
				check |= 4
			if check == 7:
				return True
	return False


def password(s):
	return any((c.isupper() for c in s)) and any((c.islower() for c in s)) and any((c.isdigit() for c in s)) and (len(s) > 7)


def lenfilt(func, seq):
	return len(list(filter(func, seq)))

def assrt(seq):
	funcs = [str.isupper, str.islower, str.isdigit, str]
	nums = [0, 0, 0, 7]
	return [lenfilt(i, seq) > j for (i, j) in zip(funcs, nums)]

def password(string):
	return all(assrt(string))


def password(string):
	k1 = k2 = k3 = 0
	if len(string) < 8:
		return False
	for i in string:
		if i.islower():
			k1 = 1
	for i in string:
		if i.isupper():
			k2 = 1
	for i in string:
		if i.isdigit():
			k3 = 1
	if k1 == k2 == k3 == 1:
		return True
	else:
		return False


def password(string):
	rules = [lambda s: any((x.isupper() for x in s)), lambda s: any((x.islower() for x in s)), lambda s: any((x.isdigit() for x in s)), lambda s: len(s) >= 8]
	if all((rule(string) for rule in rules)):
		return True
	else:
		return False