Загрузка...

Python Training Program Session 13 (Part 2) || Python Strings || String Methods

Hello Everyone! Today in this video I am going to explain about Python Strings and String methods. ✻ I really hope you find this video useful. Python Strings String Literals : String literals in python are surrounded by either single quotation marks, or double quotation marks. 'hello' is the same as "hello". Assign String to a Variable : Assigning a string to a variable is done with the variable name followed by an equal sign and the string. Strings are Arrays : Like many other popular programming languages, strings in Python are arrays of bytes representing unicode characters. However, Python does not have a character data type, a single character is simply a string with a length of 1. Square brackets can be used to access elements of the string. Slicing : You can return a range of characters by using the slice syntax. Specify the start index and the end index, separated by a colon, to return a part of the string. Negative Indexing : Use negative indexes to start the slice from the end of the string. String Length : To get the length of a string, use the len() function. String Methods : Python has a set of built-in methods that you can use on strings. The strip() method removes any whitespace from the beginning or the end. The lower() method returns the string in lower case. The upper() method returns the string in upper case. #Python #PythonTraining #JupyterNotebook #PythonForBeginners #TrainingProgram #Learning --------------------------------------------------------------------------- THANK YOU so much for watching! Please make sure to LIKE and SHARE the video and SUBSCRIBE to the channel for more such videos :) --------------------------------------------------------------------------- CONNECT WITH ME ON: ✻ LinkedIn: https://www.linkedin.com/in/sunidhi-pandey-96008b192/ ✻ GitHub: https://github.com/sunidhi2001 ✻ YouTube channel: https://www.youtube.com/channel/UCypX76paWuY76JC0rtbG61w ✻ Instagram : https://www.instagram.com/20sunidhi/

Видео Python Training Program Session 13 (Part 2) || Python Strings || String Methods автора Python: новое поколение программистов
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки