ord('h') gives you the integer value of the ASCII code for 'h'. (Longer story and potentially much bigger integer values for a unicode character). bin(i) will convert an integer to a bitstring.
>>> bin(ord('h'))
'0b1101000'
Note that there's a 0b prefix to mark the bit string as a bit string and that leading 0 bits are suppressed.
>>> print len(bin(ord('h' )))
9
...
User Profile
Collapse
-
-
Assuming you are using matplotlib to produce your graphs, see the 3rd example on
http://matplotlib.sourceforge.net/us..._tutorial.html
- The example with 3 sets of data on one graph (red dashes, blue squares and green triangles).
pyplot does accept multiple lists of y values as a single argument, but you'd need to test it to see how that works out. Given your situation, I think you should stick to the...Leave a comment:
No activity results to display
Show More
Leave a comment: