题解 | #查找兄弟单词#
查找兄弟单词
http://www.nowcoder.com/practice/03ba8aeeef73400ca7a37a5f3370fe68
s = input().split()
word, k = s[-2], int(s[-1])
lst = []
for i in s[1:-2]:
if i != word and len(i) == len(word):
letters = list(word)
for j in range(len(i)):
if i[j] in letters:
letters.remove(i[j])
else:
continue
if len(letters) == 0:
lst.append(i)
new = sorted(lst)
print(len(lst))
if 0 <= k <= len(lst):
print(new[k-1])