Why I am getting Re(NZEC) in python 3.5?

enter code here
import re
l=[]
for test in range(int(input())):
a=input()
aa=len(a)
if(aa%2==0):
aaa,bbb=a.split(’.’)
ccc=bbb[0]
aaaa=aaa+ccc
if(aaaa==bbb[::-1]):
print(aaaa+bbb)
else:
print("-1")
elif(aa%2!=0):
aaa,bbb=a.split(’.’)
if(aaa==bbb[::-1]):
print(aaa+‘a’+bbb)
else:
print("-1")

There can be more than 1 “.” in string… so aaa,bbb=a.split(’.’) would give problem I guess…

Yes It worked. I modified my code. Thanks

1 Like

Please accept answer If it was helpful… :slight_smile:

//