Create a function which accepts one arbitrary string as an argument, and return a string of length 26.

The objective is to set each of the 26 characters of the output string to either `'1'` or `'0'` based on the fact whether the Nth letter of the alphabet is present in the input (independent of its case).

So if an `'a'` or an `'A'` appears anywhere in the input string (any number of times), set the first character of the output string to `'1'`, otherwise to `'0'`. if `'b'` or `'B'` appears in the string, set the second character to `'1'`, and so on for the rest of the alphabet.

For instance:

```
"a   **&  cZ"  =>  "10100000000000000000000001"
```

Source: codewars | Difficulty: EASY
Tags: String algorithms

Fundamentals

Starter code: def change(st):
	

Solutions:
def change(st):
	new = ''
	st = st.lower()
	for letter in 'abcdefghijklmnopqrstuvwxyz':
		if letter in st:
			new += '1'
		else:
			new += '0'
	return new


def change(s):
	s = set(s.lower())
	return ''.join(('1' if x in s else '0' for x in map(chr, range(97, 123))))


ABC = 'abcdefghijklmnopqrstuvwxyz'

def change(s):
	s = set(s.lower())
	return ''.join((str(int(char in s)) for char in ABC))


def change(st):
	return ''.join(['1' if chr(i + 97) in st.lower() else '0' for i in range(26)])


def change(st):
	return ''.join(['1' if i in st.lower() else '0' for i in 'abcdefghijklmnopqrstuvwxyz'])


from string import ascii_lowercase

def change(st):
	source = st.lower()
	return ''.join(('1' if q in source else '0' for q in ascii_lowercase))


def change(st):
	s = set(filter(str.isalpha, st.lower()))
	return ''.join(('01'[chr(97 + i) in s] for i in range(26)))


def change(st):
	ze = '00000000000000000000000000'
	ze_li = list(ze)
	if 'a' in st.lower():
		ze_li[0] = '1'
	if 'b' in st.lower():
		ze_li[1] = '1'
	if 'c' in st.lower():
		ze_li[2] = '1'
	if 'd' in st.lower():
		ze_li[3] = '1'
	if 'e' in st.lower():
		ze_li[4] = '1'
	if 'f' in st.lower():
		ze_li[5] = '1'
	if 'g' in st.lower():
		ze_li[6] = '1'
	if 'h' in st.lower():
		ze_li[7] = '1'
	if 'i' in st.lower():
		ze_li[8] = '1'
	if 'j' in st.lower():
		ze_li[9] = '1'
	if 'k' in st.lower():
		ze_li[10] = '1'
	if 'l' in st.lower():
		ze_li[11] = '1'
	if 'm' in st.lower():
		ze_li[12] = '1'
	if 'n' in st.lower():
		ze_li[13] = '1'
	if 'o' in st.lower():
		ze_li[14] = '1'
	if 'p' in st.lower():
		ze_li[15] = '1'
	if 'q' in st.lower():
		ze_li[16] = '1'
	if 'r' in st.lower():
		ze_li[17] = '1'
	if 's' in st.lower():
		ze_li[18] = '1'
	if 't' in st.lower():
		ze_li[19] = '1'
	if 'u' in st.lower():
		ze_li[20] = '1'
	if 'v' in st.lower():
		ze_li[21] = '1'
	if 'w' in st.lower():
		ze_li[22] = '1'
	if 'x' in st.lower():
		ze_li[23] = '1'
	if 'y' in st.lower():
		ze_li[24] = '1'
	if 'z' in st.lower():
		ze_li[25] = '1'
	return ''.join(ze_li)


def change(stg):
	chars = set(stg.lower())
	return ''.join((str(int(c in chars)) for c in 'abcdefghijklmnopqrstuvwxyz'))