How to Code PYTHON: *String Split and Join*

Published: 25 March 2021
on channel: Coding With Kids
158
5

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 🐍
   • 🐍 Python Coding for Beginners  

For the setup, please read the followings before you begin:
1. Download latest Python: https://www.python.org/downloads/
2. Install Python and remember to select "Add Python... to PATH" when asked.
3. Download and install latest Visual Studio Code: https://code.visualstudio.com/Download
4. Install the Python extension for Visual Studio Code: Go to View and select Extensions, or select the Extensions icon, then search for python.

Python - a programming language used by world-class companies such as Amazon.com, Alphabet (Google), Facebook, Twitter, and NASA.

👇 SUBSCRIBE TO CODING WITH KIDS 👨🏻‍💻👩🏻‍💻 YOUTUBE CHANNEL NOW 👇
https://youtube.com/CodingWithKids?su...

#CodingWithKids #PythonProgramming #PythonForBeginners


On this page of the site you can watch the video online How to Code PYTHON: *String Split and Join* with a duration of hours minute second in good quality, which was uploaded by the user Coding With Kids 25 March 2021, share the link with friends and acquaintances, this video has already been watched 158 times on youtube and it was liked by 5 viewers. Enjoy your viewing!