3 points · by amingilani · 9y ago · 6 comments
I began the Coursera specialization and used Python 3 to solve the first course, but then I discovered that the rest of the courses were all using Python 2.
There aren't any Python 3 powered certifications on Coursera and since last year I read the community was on the Depression Stage [1], should I learn Python 3 or 2?
PS- Any great resources you'd recommend?
[1]: https://news.ycombinator.com/item?id=10822861
You can examine the docs [1] or source for Six, a compatibility shim. Whether or not you choose to use Six in your code -- adding another dependency -- a quick glean of the docs should familiarize you with how the two versions are different.
As for resources, you can already program, so ... Browse the manual (it is quite good), look at some pythonic* style videos* , browse the giant standard library and do some stuff with it... (the last part is key)
= yes, that is a genuine keyword, that can be googled and youtubed.. * * = this is good https://www.youtube.com/watch?v=wf-BqAjZb8MAs for "2 works as good as 3", yes, if you only care about English text.
Bytes are what is on the disk, byte value 229 could be "å" (in latin1) , "ĺ" in latin2, or different things in other encodings... Only the lower 127 are "standard" (unless you are in EBCDIC on a mainframe where code 78 is "+" instead of "N")..
If you know the encoding of the bytes (i.e. what language/text type are they), you can "decode" the bytes to a string type, which is unicode glyphs (not utf8, which is also a byte encoding)... When you want to get back to bytes, you just encode it again....
I don't get it, why people find it so hard...
PS. They are quite similar actually.