Initial commit: Python learning project with examples and exercises

This commit is contained in:
2025-07-20 17:08:50 +08:00
commit bc7bb56271
111 changed files with 11535 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
#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()