first and last digits of a number Get link Facebook X Pinterest Email Other Apps March 28, 2022 first and last digits of a number n=input() l=[] k=len(n) for i in range(k): if(i==0 or i==k-1): l.append(n[i]) for i in l: print(i) Get link Facebook X Pinterest Email Other Apps Comments
Comments
Post a Comment