Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
603 B
0
Indexable
Never
def strtolist(a):
    use  = []
    for i in a:
        use+=[i]
    use +=["1"]
    
    strng = "".join(use)
    return strng
        

def multidimensional(whole):
    
    for i in whole:
        val = i.count("1")
        if (val%2)==0:
            print(i)
        else:
            val = strtolist(i)
            indx = whole.index(i)
            indx = indx+1
            print(val)
            print("error is at the line {}".format(indx))
            

a = int(input())
whole = []
for i in range(a):
    a = input()
    whole += [a]
whole = multidimensional(whole)
Leave a Comment