TypeError 'generator' object is unsubscriptable
|
| View previous topic :: View next topic |
| Author |
Message |
Nesh Guest
|
Pls help.
I get this error:
TypeError 'generator' object is unsubscriptable
ion an example like this:
What is a generator and how do I get the vales I need from it?
Thank you |
| |
|
|
|
|
Madwolf Site Admin
Joined: 22 Dec 2004 Posts: 70
|
That's because the b variable can be a tuple.
What you can do to access the values in variable b is
create a new massive with it's contents.
example:
| Code: |
massive = []
for x in b:
massive.append(x)
a = massive[0] |
|
| |
|
|
|
|