Advertisement
treyhunner

Python 2 vs 3 upper

Jun 3rd, 2017
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. Python 2
  2.  
  3. >>> print 'αβγ'.upper()
  4. αβγ
  5. >>> print u'αβγ'.upper()
  6. ΑΒΓ
  7.  
  8. Python 3
  9.  
  10. >>> print('αβγ'.upper())
  11. ΑΒΓ
  12. >>> print(b'αβγ'.upper())
  13. File "<stdin>", line 1
  14. SyntaxError: bytes can only contain ASCII literal characters.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement