题解 | #取近似值#
提取不重复的整数
http://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
x = input()
x = x[::-1]
for i in range(len(x)):
if x[i] in x[:i]:
continue
else:
print(x[i],end="")
利用切片不包含i的特性判断重复
提取不重复的整数
http://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1
x = input()
x = x[::-1]
for i in range(len(x)):
if x[i] in x[:i]:
continue
else:
print(x[i],end="")
利用切片不包含i的特性判断重复
相关推荐