Created
November 11, 2011 19:05
-
-
Save gumeniukcom/1358891 to your computer and use it in GitHub Desktop.
Работа со списками в Python #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List = [x + 1 for x in range(10)] # создается новый список, элементы которого увеличены на единицу | |
List = [x + 1 for x in range(10) if x % 2 == 0] # создается новый список, четные элементы которого увеличены на единицу |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment