Guest User

Untitled

a guest
Jun 19th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. word = [input("Enter the string: ")]
  2.  
  3. word1 = word.append[:1]
  4.  
  5. word2 = word[-2:]
  6.  
  7. word3= list(zip(word1,word2))
  8.  
  9. print(word3)
  10.  
  11. Enter the string: bbnnnvvv
  12. Traceback (most recent call last):
  13. File "C:/PythonApp/Python Project/strings2.3.py", line 5, in <module>
  14. word1 = word.append[:1]
  15. TypeError: 'builtin_function_or_method' object is not subscriptable
Add Comment
Please, Sign In to add comment