RUVIDEO
Поделитесь видео 🙏

Python Casefold String Method

Be sure to like, share and comment to show your support for our tutorials.

=======================================
Channel - https://goo.gl/pnKLqE
Playlist For This Tutorial - https://goo.gl/EyZFti
Latest Video - https://goo.gl/atWRkF
Facebook - https://www.facebook.com/mastercodeonline/
Twitter - https://twitter.com/mastercodeonlin?lang=en
Website - http://mastercode.online
======================================
Python Casefold String Method
In this Python tutorial, we are going to discuss the Python casefold string method. The casefold string method is similar the lower string method and the only difference is that casefold removes any reference to case distinction in a Python string. This means that there is no upper or lower case character in the new string object after calling the casefold string method on a string.

Examples of Casefold String Method
In these examples we are going to remove any case declaration in a string with the casefold method in Python.

#Example 1
a = 'This is a new Python String'
a.casefold()
'this is a new python string'

#example 2
b = 'This String Is A Title and We Want To Reassign The String'
b = b.casefold()
b
'this string is a title and we want to reassign the string'

#example 3
'We can use casefold like this as well'.casefold()
'we can use casefold like this as well'

#example 4
print('We can use casefold in a print statement too'.casefold())
we can use casefold in a print statement too

#example 5
c = 'THIS IS A BUNCH OF CHARACTERS WITH CAP LOCK ON'
print(c.casefold())
this is a bunch of characters with cap lock on
Examples Explained

Example 1:

a = 'This is a new Python String' - We create a new string object with some capitalized characters in the string. This string is assigned the variable 'a'.
a.casefold() - We then take the string object via the variable and call the casefold string method on the string object.
'this is a new python string' - We are returned a string that contains no case information. We have no capitalized characters.
Example 2:

b = 'This String Is A Title and We Want To Reassign The String' - We create a new string object and assign the variable 'b' to the string object.

b = b.casefold() - We now take our string object call the casefold string method on the string object and reassign the b variable to the string method.

b 'this string is a title and we want to reassign the string' - We now call the variable b and have a string returned to us with no case declaration.

Example 3:

'We can use casefold like this as well'.casefold()- We create a string object and call casefold on the object all in one line.

'we can use casefold like this as well' - We are returned a new string object with no case information.

Example 4:

c = 'THIS IS A BUNCH OF CHARACTERS WITH CAP LOCK ON'- We create a new string object and assign the variable c to the string object with cap lock on.

print(c.casefold()) - We then call a print statement on our string object that is represented by the variable c and call the string method of casefold on our string method.

this is a bunch of characters with cap lock on - We are returned a string with no cap declaration

Conclusion

In this Python tutorial we have looked at how to remove capitalized information from a string. The Python casefold string method is similar to the lower string method but casefold removes all case information from a string object. If you have any questions please leave a comment below.

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Python Casefold String Method», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.