fork download
  1. def common_member(proc, fat):
  2. proc_set = set(proc)
  3. fat_set = set(fat)
  4.  
  5. if (proc_set & fat_set):
  6. print(proc_set & fat_set)
  7. else:
  8. print("Não há elementos em comum")
  9.  
  10.  
  11. proc = [1,2,3,4]
  12. fat= [3,4,5,6]
  13. common_member(proc, fat)
Success #stdin #stdout 0.02s 9184KB
stdin
Standard input is empty
stdout
{3, 4}