darksantos

Ejercicio07

May 30th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. tupla = 3,6,9,10,17
  2.  
  3. print 'Esta es la tupla',tupla
  4.  
  5. x=tupla[0:len(tupla):2]
  6. print 'Ciertos elementos de la tupla: ',x
  7.  
  8. y=[]
  9. for i in range(len(tupla)-1,-1,-1):
  10.     y.append(tupla[i])
  11. print 'Tupla invertida: ',tuple(y)
  12.  
  13. #for i in range(0,len(tupla)):
  14. #   y.append(tupla[i])
  15. #print reverse(y)
Advertisement
Add Comment
Please, Sign In to add comment