본문 바로가기
Python

python all

by NaHyungMin 2019. 9. 6.

numbers = [123];

numbers2 = [1230];

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