Advertisement
niromru

3-я задача

Jan 9th, 2021
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. a = input().split()
  2. b = input().split('-L-')
  3. c = input().split('>W<')
  4. for i in a:
  5.     va, vb, vc = '', '', ''
  6.     va += (i + ':')
  7.     for i2 in b:
  8.         if len(list(set(i2.lower()))) >= 3 and len(list(set(i.lower()) & set(i2.lower()))) >= 1:
  9.             vb += (i2.upper() + '; ')
  10.     if vb != '':
  11.         vb = vb[:-2]
  12.     for i2 in c:
  13.         if i2.islower() and len(i2) <= len(i):
  14.             vc += (i2 + ' * ')
  15.     if vc != '':
  16.         vc = vc[:-3]
  17.     print(va)
  18.     print(vb)
  19.     print(vc)
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement