fork download
  1. def cin():
  2. name = []
  3. n = int(input("Nhap vao so luong ten: "))
  4. for i in range(n):
  5. print("Nguoi thu ", i+1, ":", sep="", end=" ")
  6. name.append(input())
  7. return name
  8.  
  9. def Srt(lst):
  10. n=len(lst)
  11. res=[]
  12. for i in range(n-1):
  13. if(len(lst[i])>=5):
  14. res.append(lst[i])
  15. return res
  16.  
  17. lst = cin()
  18. ans=Srt(lst)
  19. print("\nDanh sach sau khi loc la:")
  20. for i in range(len(ans)):
  21. print(ans[i])
  22.  
  23.  
Success #stdin #stdout 0.03s 9892KB
stdin
4
Truong
Le
Quy
Don
stdout
Nhap vao so luong ten: Nguoi thu 1: Nguoi thu 2: Nguoi thu 3: Nguoi thu 4: 
Danh sach sau khi loc la:
Truong