Метод join у строк
У строк есть полезный метод str.join(), который принимает на вход итерируемый объект, элементами которого также должны быть строки.
Как результат получаем новую строку, которая является объединениемвсехэлементов. При этом они разделены строкой, к которой изначально применялся метод.
Проще говоря, если применить к строке этот метод, то она станет разделителем для элементов в новой строке.
#python#string
🖥
Tip: You can use functools.reduce() in #Python to apply a function to all elements of the iterable set.
-----
Main channel: @repo_science
Coupons: @freecoupons_reposcience
-----
#Python
🖥
Test your typing knowledge in Python
Cool free project Python Type Challenger is a quiz where you have to write code. A good way to remember the basics of type hints (dictionaries, variables, return) and drill into the depths of the typing ocean (recursive, decorators, constructors, etc.).
🔗Link
-----
Main channel: @repo_science
Coupons: @freecoupons_reposcience
-----