Untitled
unknown
plain_text
2 years ago
603 B
7
Indexable
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)Editor is loading...
Leave a Comment