How can I extract data from a class in Python?
>>>Bio.Alphabet.RNAAlphabet <class Bio.Alphabet.RNAAlphabet at 0x01EBF420>
How can I extract, say for example, the letters of that Alphabet from that object in Byophthon?
In order to know the possible methods (functions) or attributes of an object (the data contained within that object), you should use the following Python command:
In your case, this would probably give:
This will tell you what you can use or visualize in the object.
I suggest that you take some time familiarizing yourself with classes and object oriented programming in Python
Let's say the name of the attribute containing the data is 'letters', you can print it like this:
If you don't want to print it, put it in a variable or torture it however you like :P.