Skip to content

Instantly share code, notes, and snippets.

@dguaraglia
Created December 11, 2017 22:53
Show Gist options
  • Save dguaraglia/e7f7c875b4f82be330d4013764f923d8 to your computer and use it in GitHub Desktop.
Save dguaraglia/e7f7c875b4f82be330d4013764f923d8 to your computer and use it in GitHub Desktop.
$ python2.7 2 ↵
Python 2.7.13 (default, Aug 7 2017, 19:25:44)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> s = b"somechars"
>>> type(s)
<type 'str'>
>>> c = s[3]
>>> type(c)
<type 'str'>
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment