Advertisement
fahadkalil

exemplo_lacos

Oct 17th, 2019
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. # exemplos
  2. lista = [8, 7, 9]
  3.  
  4. print(lista)
  5. print(" 0  1  2")
  6. print("----------")
  7. print("Compara e avanca o indice i")
  8. for i in range(len(lista)):
  9.     for j in range(i):
  10.         print("comparando: {}[{}] x {}[{}]".format(lista[j], j, lista[i], i))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement