How to Code PYTHON: *String Split and Join*

preview_player
Показать описание
Let's get started! 🔥🔥🔥 In this video, we will write few PYTHON 🐍 scripts to demonstrate how to split a string based on a delimiter and join a list of string using a delimiter using a couple string helper functions. Splitting a string is useful when you only need certain portions of a strings or simply want to separate words in a string such as first name and last name in a full name. A popular example is using split to get data from CSV (Comma Separated Files) and join a list of string to write data to CSV. In this tutorial, you will learn some basics in less than 5 minutes!

In this video, you will learn how to:
★ 0:31 list() splits a string into letters (characters) by default
★ 0:50 Use split() function to split a string into a list based on a delimiter
★ 1:52 Use join() function to join a list of string using a delimiter
★ 3:25 Use multiple split() and join() to split a string with different delimiters into a list of string.
★ 3:55 Use multiple split() and replace() to split a string with different delimiters into a list of string.

Tips and Tricks:
► The split() method splits a string into a list. You can specify the delimiter (separator), default delimiter is any whitespace.
► The join() method takes all items in an iterable such as list and joins them into one string. The string must be specified as the delimiter.

WATCH MORE PYTHON TUTORIALS 🐍

For the setup, please read the followings before you begin:
2. Install Python and remember to select "Add Python... to PATH" when asked.
4. Install the Python extension for Visual Studio Code: Go to View and select Extensions, or select the Extensions icon, then search for python.

👇 SUBSCRIBE TO CODING WITH KIDS 👨🏻‍💻👩🏻‍💻 YOUTUBE CHANNEL NOW 👇

#CodingWithKids #PythonProgramming #PythonForBeginners
Рекомендации по теме
Комментарии
Автор

In this video, you will learn how to:
★ 0:31 list() splits a string into letters (characters) by default
★ 0:50 Use split() function to split a string into a list based on a delimiter
★ 1:52 Use join() function to join a list of string using a delimiter
★ 3:25 Use multiple split() and join() to split a string with different delimiters into a list of string.
★ 3:55 Use multiple split() and replace() to split a string with different delimiters into a list of string.

CodingWithKids