12345678910111213141516171819202122232425262728293031323334 |
- def test_1():
- a = ['sfd', 'werwer', '']
- print(all(a))
- print(any(a))
- # test_1()
- def test_2():
- words = ['notice', 'deter', 'west', 'brush', 'stadium',
- 'package', 'price', 'clothes', 'sword', 'apology']
- check = [len(word) >= 4 for word in words]
- print(check)
- print(all(check))
- print(all([len(word) > 4 for word in words]))
- print(any([len(word) > 7 for word in words]))
- print(any([len(word) >= 7 for word in words]))
- # test_2()
- def test_3():
- words = list(input().split(' '))
- print(all(['A' in word or 'a' in word for word in words]))
- # test_3()
- def test_4():
- my = input().lower().split()
- print(any([word.endswith('ought') for word in my]))
- # test_4()
|