题解 | #最长&最短文本#
最长&最短文本
https://www.nowcoder.com/practice/3331d16fe07d4358858178ff5fa73e0d
s = []
while True:
try:
s.append(input())
except:
s.sort(key=lambda x: len(x))
min_len = len(s[0])
max_len = len(s[-1])
while s and len(s[0]) == min_len:
print(s.pop(0))
while s and len(s[-1]) == max_len:
print(s.pop(-1))
break
