If join returns a string, why am I getting a syntax error when I try  to
slice it?

>>> 'alfabeta'[2:5]
'fab'
>>> ''.join(['a', 'l', 'f', 'a', 'b', 'e', 't', 'a')[2:5]
SyntaxError: invalid syntax

-- 
Jim
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to