#This ismy code working perfectly and giving the right answer but still spoj is not accepting it ! please/ help me with this as soon as possible ! thanks in advance lis=[] temp=[] n=int(input()) if(n>=1 and n<=100): while(n!=0): b=input() if (int(len(b))%2==0 and int(len(b))>=1 and int(len(b))<=100): lis.append(b) n=n-1 else: break else: pass
for i in range(len(lis)): temp=list(lis[i]) for j in range(int(len(temp))//2): if(j%2==0): print(temp[j],end="") else: j=j+1 print("\n",end="") del temp[:]
You really need to use code tags so the indentation is preserved.
…my code working perfectly and giving the right answer …
well, obviously, it isn’t.
Your check on the length of the input is wrong.