Guest User

Untitled

a guest
Feb 16th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. print('\nChave Interativa para identificação de taxons\n'
  2. '-> Museu Tauari\n')
  3.  
  4. caractere = str(input('Digite um caractere presente no espécime: '))
  5.  
  6. taxonA = ['braço', 'perna', 'olhos']
  7. taxonB = ['braço', 'perna', 'nariz']
  8. taxonC = ['cabeça', 'pés', 'nariz']
  9. taxonD = ['antena', 'bigode', 'torax']
  10.  
  11. listas = [taxonA, taxonB, taxonC, taxonD]
  12.  
  13. indices1 = set()
  14. indices2 = set()
  15.  
  16. for (taxon, index) in zip(listas, range(len(listas))):
  17. if caractere in taxon:
  18. indices1.add(index)
  19.  
  20. caractere2 = str(input('\nDigite outro caractere: '))
  21.  
  22. for (taxon, index) in zip(listas, range(len(listas))):
  23. if caractere2 in taxon:
  24. indices2.add(index)
  25.  
  26. print(indices1.intersection(indices2))
Add Comment
Please, Sign In to add comment