ds_seq.txt 423 B

1234567891011121314151617
  1. $ python ds_seq.py
  2. Item 0 is apple
  3. Item 1 is mango
  4. Item 2 is carrot
  5. Item 3 is banana
  6. Item -1 is banana
  7. Item -2 is carrot
  8. Character 0 is s
  9. Item 1 to 3 is ['mango', 'carrot']
  10. Item 2 to end is ['carrot', 'banana']
  11. Item 1 to -1 is ['mango', 'carrot']
  12. Item start to end is ['apple', 'mango', 'carrot', 'banana']
  13. characters 1 to 3 is wa
  14. characters 2 to end is aroop
  15. characters 1 to -1 is waroo
  16. characters start to end is swaroop