题解 | #单词造句#

单词造句

https://www.nowcoder.com/practice/c0c7fa7523ea4651bd56b6cbc8c65c66

import sys


# str1 = ''
# while True:
#     a = input()
#     if a == '0':
#         break

#     else:
#         if str1:
#             str1 = str1 +' '+a
            
#         else:
#             str1=a

# print(str1)

list1 = []
while True:
    a = input()
    if a == '0':
        break

    else:
        list1.append(a)
        # str1 = ' '.join(a)

print(' '.join(list1))

全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务