human
Check whether a given string is Heterogram or not | Python3 code to check whether the given string is Heterogram or not ..
traversing the string ..
ignore the space.
if already encountered.
else return false ..
Driven Code"
How can the above be solved in Python?

Give me a code to check whether a given string is Heterogram or not and the other steps required?
assistant
#Here is code to check whether a given string is Heterogram or not and the other steps required.
 def isHeterogram ( s , n ) :
	hash = [ 0 ] * 26
	for i in range ( n ) :
		if s [ i ] != ' ▁ ' :
			if hash [ ord ( s [ i ] ) - ord ( ' a ' ) ] == 0 :
				hash [ ord ( s [ i ] ) - ord ( ' a ' ) ] = 1
			else :
				return False
	return True
s = " the ▁ big ▁ dwarf ▁ only ▁ jumps "
n = len ( s )
print ( " YES " if isHeterogram ( s , n ) else " NO " )