Difference between bytes and strings When working with data inputs in Python — processing text, doing statistical analysis — we are working with strings. In [7]: type(‘café’) Out[7]: str When reading files from disc into Python we decode binary data into strings and when saving text to disc we encode stings to binary. str.encode() method is…

© 2014 In R we trust.
Top
Follow us: