Oh! I see I should have used [] square brackets rather than () curved
brackets.. Maybe I should chew this over before I post to the forum.
Sorry guys..
myList = *[*'Perth', 'Albany', 'Sydney', 'Wellinton', 'London', 'Thailand',
'San_Francisco'*]*
On Tuesday, September 5, 2017 at 3:05:25 PM UTC-7, jettam wrote:
>
> Hi,
> The .sort command should sort myList into alphabetical order. But it
> doesnt. Instead I get this error.
> myList.sort()
> # Error: 'tuple' object has no attribute 'sort'
> # Traceback (most recent call last):
> # File "<maya console>", line 2, in <module>
> # AttributeError: 'tuple' object has no attribute 'sort' #
>
> Any ideas what I'm doing wrong here?
>
> myList = ('Perth', 'Albany', 'Sydney', 'Wellinton', 'London', 'Thailand',
> 'San_Francisco')
> myList.sort()
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/1611017f-dde7-45cf-9858-3af852fb5333%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.