Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
442 B
1
Indexable
Never
def number(x):
    list =[]
    while x>0:
        list.append(x%10)
        x//=10
    return list[::-1]
print(number(122))
def divide(x):
    list =[]
    while x>0:
        list.append(x%10)
        x//=10
    return list[::-1] and sum(list)
print(divide(122))
def compare(x):
    list = []
    i1= x%10
    i2=x//10
    for x in list:
        if i1 == i2:
            return True
        else:
            return False
print(compare(22))
Leave a Comment