- [Instructor] In Python 3,…there are very important differences…between the notions of strings and bytes.…And it's important to understand this distinction.…A string in Python 3 is a sequence of Unicode characters,…while bytes are a sequence of raw eight-bit values.…It's important to understand this…because you can't just treat a string…as if it were an array of ASCII eight-bit values.…So, let's take a look at this in practice.…Here in VS Code I have my strings_start.py file open…and I have defined two variables here, b and s.…
So, b is a sequence of bytes and s is a string.…And I can print out each one to see what their values are.…So, I've got VS Code set up to just run my Python directly,…so I'm gonna click on the Debug tab…and I'm going to run this.…And you can see in the output…that the first is a sequence of bytes,…as noted by the little b character right there.…And the second print statement prints out this is a string.…Now, if you're not using VS Code…and you want to run this example,…you can just do that from the terminal window.…
- Truth value testing
- Template strings
- Advanced Python functions
- Advanced collections
- Advanced classes and objects
- Python comprehensions: list, dictionary, and set
Skill Level Advanced
1. Python Language Features
2. Built-In Functions
3. Advanced Python Functions
4. Advanced Collections
5. Advanced Classes and Objects
6. Using Logging
7. Python Comprehensions
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.