Tag: front
What does ‘b’ mean in front of a string in Python?
In this python tutorial, you will learn what ‘b’ will do in front of a string. Table of Contents Define “b” How to create a byte string? Encode string into a byte Encode a string to byte string with UTF-8 encoding. Encode a string to byte string with UTF-16 encoding. Encode a string to byte …
Add an element at the front of a List in Python
This tutorial will discuss about unique ways to add an element at the front of a list in Python. Table Of Contents Using insert() function of List Using List Slicing Using astrik to unpack list and item at front Summary Using insert() function of List Python List provides a function insert(index, element) to add a …