Untitled

mail@pastecode.io avatar
unknown
plain_text
18 days ago
614 B
2
Indexable
Never
def containsUnique(inp):
	s=set()
	for char in inp:
		if char in s:
			return False
		s.add(char)
	return True
	return len(set(inp.split("")))==len(inp)


def getSingleDigit(number):
	while number>10:
		tmp = str(number)
		tmpInt = 0
		for i in tmp:
			tmpInt= tmpInt + int(i)
		number=tmpInt
	return number

	tmpNumber=number
	while tmpNumber>10 :
		tmp = str(tmpNumber)
		tmpNumber = sum([int(i) for i in tmp.split()])
	return tmpNumber

	tmpNumber=number
	while tmpNumber>10:
		tsum=0
		modNumber = tmpNumber
		while modNumber>0:
			tsum=modNumber%10
			modNumber=modNumber/10
		tmpNumber=tsum
	return tmpNumber
Leave a Comment