15 lines
255 B
Python
15 lines
255 B
Python
#7.1.3
|
|
list1 = input().split(' ')
|
|
print(list1)
|
|
list2 = []
|
|
for i in list1:
|
|
if '2'<=i<='5':
|
|
list2.append(i)
|
|
print(list2)
|
|
str1 = '-'.join(list2)
|
|
print(str1)
|
|
|
|
txt1 = open('7.1.3.txt',"w")
|
|
txt1.write(str1 + '\n')
|
|
txt1.writelines(list2)
|
|
txt1.close() |