filmov
tv
POWERFUL Trick for Python DICTIONARIES ???!! #shorts #python #pythonprogramming #dictionary

Показать описание
How to use dictionary comprehension to get the lengths of all strings in the Python programming language.
Python code of this video:
ml = ['Apple', 'Banana', 'Orange']
ml_length = [len(x) for x in ml]
print(ml_length)
md_length = {x:len(x) for x in ml}
print(md_length)
Follow me on Social Media:
Python code of this video:
ml = ['Apple', 'Banana', 'Orange']
ml_length = [len(x) for x in ml]
print(ml_length)
md_length = {x:len(x) for x in ml}
print(md_length)
Follow me on Social Media: