Python List Comprehension - Code Quickie #19

preview_player
Показать описание

In this video I will show you a lot of ways you can use List Comprehension in Python to make and modify lists. It is pretty cool stuff!

0:00 Introduction
07:27 Form of List Comprehension
02:17 Working with Strings
04:08 Nested Array
06:28 Conditionals
09:19 Conditional Inside Expression
11:24 Nested Looping
14:22 Functions

Like. Share. Sub.

Graphics:
Anvil Media Foundry

#Python #Programming #list
Рекомендации по теме
Комментарии
Автор

Could you please help with this? I don't understand what *x for x* mean. Are these two x's different?

fruits = ["apple", "banana", "cherry", "kiwi"]

newlist = [x for x in fruits if "a" in x]

print(newlist)

liri
Автор

Advertising is covering part of your output, making the video harder to follow

na