fork(1) download
  1.  
  2. d = ['this', 'is', 'page', 'hello', 'guys']
  3. m = ["H e l l o g u y s", "T h i s i s P a g e 1", "H e l l o g u y s", "H e l l o g u y s"]
  4. j = ''.join(m[0].split()).lower()
  5.  
  6. temp = []
  7. fix = []
  8.  
  9.  
  10. for i in j:
  11. temp.append(i)
  12. s = ''.join(temp)
  13.  
  14. if s in d:
  15. fix.append(s)
  16. del temp[:]
  17.  
  18. if i.isdigit():
  19. fix.append(i)
  20.  
  21. print(' '.join(fix))
  22.  
  23.  
  24.  
Success #stdin #stdout 0.1s 10088KB
stdin
Standard input is empty
stdout
hello guys