In programming you know the use of the logical negation operator (**!**), it reverses the meaning of a condition.

Your task is to complete the function 'negationValue()' that takes a string of negations with a value and returns what the value would be if those negations were applied to it.

```python
negation_value("!", False) #=> True
negation_value("!!!!!", True) #=> False
negation_value("!!", []) #=> False
```

Do not use the `eval()` function or the `Function()` constructor in JavaScript.

Note: Always return a boolean value, even if there're no negations.

Difficulty: EASY
Starter code: def negation_value(s, val):
	

Solutions:
def negation_value(s, x):
	return len(s) % 2 ^ bool(x)


def negation_value(s, val):
	return len(s) & 1 ^ bool(val)


def negation_value(s, val):
	return bool(val) if len(s) % 2 == 0 else not val


def negation_value(str, val):
	return bool(not val if len(str) % 2 else val)


negation_value = lambda s, val: [bool(val), not val][len(s) % 2]


def negation_value(s, val):
	return len(s) % 2 == (not val)


def negation_value(s, val):
	if val:
		a = True
	else:
		a = False
	return [a, 1 - a][s.count('!') % 2]


def negation_value(s, val):
	if len(s) % 2:
		return not val
	else:
		return not not val