Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

str vs bytes in Python

Автор: mCoding

Загружено: 2023-02-27

Просмотров: 81844

Описание:

strings vs. bytes, what's the diff?

Strings and bytes are both fundamental types in Python. At a surface level they also appear do be very similar objects. From the similar notation, to the functions they offer, to their use cases like writing to a file, bytes and strings appear to do nearly the same thing. And yet, Python enforces a strict separation between them, making them unable to mix and requiring explicit conversions using str.encode() or bytes.decode() in order to translate between them. So what makes them different at all? In this video we'll find out how str and bytes differ and talk about encodings, like utf-8, which are the missing link between them.

― mCoding with James Murphy (https://mcoding.io)

Source code: https://github.com/mCodingLLC/VideosS...
bytes docs: https://docs.python.org/3/library/std...
Official unicode site: https://home.unicode.org/
UTF-8 wiki: https://en.wikipedia.org/wiki/UTF-8
PEP 686: https://peps.python.org/pep-0686/

SUPPORT ME ⭐
---------------------------------------------------
Sign up on Patreon to get your donor role and early access to videos!
  / mcoding  

Feeling generous but don't have a Patreon? Donate via PayPal! (No sign up needed.)
https://www.paypal.com/donate/?hosted...

Want to donate crypto? Check out the rest of my supported donations on my website!
https://mcoding.io/donate

Top patrons and donors: Jameson, Laura M, Dragos C, Vahnekie, Neel R, Matt R, Johan A, Casey G, Mark M, Mutual Information

BE ACTIVE IN MY COMMUNITY 😄
---------------------------------------------------
Discord:   / discord  
Github: https://github.com/mCodingLLC/
Reddit:   / mcoding  
Facebook:   / james.mcoding  

CHAPTERS
---------------------------------------------------
0:00 Intro
0:20 str and bytes syntax
0:50 str and bytes functions
1:29 they don't mix
2:17 amazing sponsor
2:40 smiley
3:33 the meaning of bytes
4:53 encodings
6:07 dangers of not specifying encoding
7:21 warn default encoding
7:35 utf-8 mode
8:06 Outro and thanks

str vs bytes in Python

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Python's sharpest corner is ... plus equals? (+=)

Python's sharpest corner is ... plus equals? (+=)

__new__ vs __init__ in Python

__new__ vs __init__ in Python

Разработчик C++ изучает Python

Разработчик C++ изучает Python

Синьор 1С: 10 привычек, без которых ты не вырастешь

Синьор 1С: 10 привычек, без которых ты не вырастешь

4 причины, почему C++ по-прежнему ПРЕВОСХОДИТ Rust (техническая реальность)

4 причины, почему C++ по-прежнему ПРЕВОСХОДИТ Rust (техническая реальность)

All Rust string types explained

All Rust string types explained

Metaclasses in Python

Metaclasses in Python

Генераторы Python

Генераторы Python

Unicode, in friendly terms: ASCII, UTF-8, code points, character encodings, and more

Unicode, in friendly terms: ASCII, UTF-8, code points, character encodings, and more

Джеймс Беннетт — Немного о байтах: Понимание байт-кода Python — PyCon 2018

Джеймс Беннетт — Немного о байтах: Понимание байт-кода Python — PyCon 2018

21 MORE nooby Python habits

21 MORE nooby Python habits

Extending Python's Number hierarchy

Extending Python's Number hierarchy

8 things in Python you didn't realize are descriptors

8 things in Python you didn't realize are descriptors

Трамп опять презирает Зеленского?

Трамп опять презирает Зеленского?

5 Useful F-String Tricks In Python

5 Useful F-String Tricks In Python

Вот почему классы данных Python так хороши

Вот почему классы данных Python так хороши

Код работает в 100 раз медленнее из-за ложного разделения ресурсов.

Код работает в 100 раз медленнее из-за ложного разделения ресурсов.

Modern Python logging

Modern Python logging

Все библиотеки и модули Python объясняются за 13 минут

Все библиотеки и модули Python объясняются за 13 минут

Почему ваш код не соответствует Python (и как это исправить)

Почему ваш код не соответствует Python (и как это исправить)

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: infodtube@gmail.com