jmunsch

test

Jul 2nd, 2014
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.66 KB | None | 0 0
  1. >>> a = ['1523_1','1523_2','1523_3','1523_10']
  2. >>> a
  3. ['1523_1', '1523_2', '1523_3', '1523_10']
  4. >>> print(a.sorted)
  5. Traceback (most recent call last):
  6.   File "<stdin>", line 1, in <module>
  7. AttributeError: 'list' object has no attribute 'sorted'
  8. >>> print(a.sorted())
  9. Traceback (most recent call last):
  10.   File "<stdin>", line 1, in <module>
  11. AttributeError: 'list' object has no attribute 'sorted'
  12. >>> print(a.sort())
  13. None
  14. >>> print(a.sort())
  15. None
  16. >>> a
  17. ['1523_1', '1523_10', '1523_2', '1523_3']
  18. >>> a = ['/asdf/1523_1','/asdf/1523_2','/asdf/1523_3','/asdf/1523_10']
  19. >>> a.sort()
  20. >>> a
  21. ['/asdf/1523_1', '/asdf/1523_10', '/asdf/1523_2', '/asdf/1523_3']
  22. >>>
Advertisement
Add Comment
Please, Sign In to add comment