# How much is the fish! (- Scooter )
The ocean is full of colorful fishes. We as programmers want to know the hexadecimal value of these fishes.

## Task
Take all hexadecimal valid characters (a,b,c,d,e,f) of the given name and XOR them. Return the result as an integer.

## Input
The input is always a string, which can contain spaces, upper and lower case letters but no digits. 

## Example

`fisHex("redlionfish") -> e,d,f -> XOR -> 12`

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Starter code: def fisHex(name):
	

Solutions:
from functools import reduce
VALID = frozenset('abcdefABCDEF')

def fisHex(s):
	return reduce(lambda b, c: b ^ c, (int(a, 16) for a in s if a in VALID), 0)


def fisHex(name):
	hexdict = {'A': 10, 'B': 11, 'C': 12, 'D': 13, 'E': 14, 'F': 15}
	res = 0
	for c in name.upper():
		if c in hexdict:
			res ^= hexdict[c]
	return res


def fisHex(name):
	hexx = {'a': 10, 'b': 11, 'c': 12, 'd': 13, 'e': 14, 'f': 15}
	name = name.lower()
	result = 0
	for i in name:
		if i in hexx:
			result = result ^ hexx[i]
	return result


from functools import reduce

def fisHex(name):
	hex = ['a', 'b', 'c', 'd', 'e', 'f']
	hexFish = []
	for i in name.lower():
		if i in hex:
			hexFish.append(i)
	hexList = [int(x, 16) for x in hexFish]
	if hexList != []:
		hexValue = hexList[0]
	else:
		return 0
	hexValue = reduce(lambda x, y: x ^ y, hexList)
	return hexValue


from functools import reduce
fisHex = lambda s: reduce(lambda x, y: x ^ y, [int(i, 16) for i in s if i in 'ABCDEFabcdef'] or [0])


from functools import reduce
from operator import xor

def fisHex(name):
	return reduce(xor, (int(x, 16) for x in name.lower() if 'a' <= x <= 'f'), 0)


from functools import reduce
from operator import xor

def fisHex(name):
	s = set('abcdef')
	return reduce(xor, map(lambda c: int(c, 16), (c for c in name.lower() if c in s)), 0)


def fisHex(name):
	print(name)
	hex_string = 'abcdef'
	name = name.lower()
	values = [i for i in name if i in hex_string]
	if len(values) >= 1:
		placeholder = int(str(values.pop()), 16)
		for num in values:
			placeholder = placeholder ^ int(num, 16)
		return placeholder
	else:
		return 0


def fisHex(name):
	return eval('^'.join(['0x' + c for c in name.lower() if c in 'abcdef'])) if name else 0


from operator import xor
from functools import reduce

def fisHex(name):
	return reduce(xor, (ord(c) - 87 for c in name.lower() if c in 'abcdef'), 0)


hexa = {'a': 10, 'b': 11, 'c': 12, 'd': 13, 'e': 14, 'f': 15}

def fisHex(name):
	print(name)
	hexv = [hexa[i] for i in name.lower() if i in hexa]
	s = 0
	for i in range(0, len(hexv)):
		s = s ^ hexv[i]
	return s


from functools import reduce

def fisHex(name, l={'a': 10, 'b': 11, 'c': 12, 'd': 13, 'e': 14, 'f': 15, 'A': 10, 'B': 11, 'C': 12, 'D': 13, 'E': 14, 'F': 15}):
	return reduce(lambda acc, x: acc ^ l.get(x, 0), name, 0)


fisHex = f = lambda s: len(s) and (s[0] in 'abcdefABCDEF' and int(s[0], 16)) ^ f(s[1:])


from functools import reduce
fisHex = lambda name: reduce(lambda a, b: a ^ b, [int(l, 16) if l in 'abcdef' else 0 for l in name.lower()], 0)