Advertisement
HBSB

3.2 Iterables

Mar 4th, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. phrase="hello"
  2. phrase[0]
  3. phrase[0:4]
  4.  
  5. phrase[0]
  6. phrase[1]
  7. phrase[2]
  8. phrase[3]
  9. phrase[4]
  10.  
  11. print("phrase[0:4] reflects my occasional thoughts when I've forgotten to use square brackets and go round instead.  Then I start to remember and be more careful.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement