numbers = [1, 2, 3]; numbers2 = [1, 2, 3, 0]; numbers3 = [0] * 10; strings = ["1", "2", "3", "4"];
print(all(numbers)); print(all(numbers2)); print(all(numbers3)); print(type(0)); print(all(strings));
for i in numbers2: print(i, end=" ");
print(""); for i in numbers3: print(i, end=" "); |
True
False
False
<class 'int'>
True
1 2 3 0
0 0 0 0 0 0 0 0 0 0
'Python' 카테고리의 다른 글
python chr (0) | 2019.09.06 |
---|---|
python exception2 (0) | 2019.09.06 |
python exception (0) | 2019.09.06 |
python class2 (0) | 2019.09.06 |
python class (0) | 2019.09.04 |