二十五岁时我们都一样愚蠢、多愁善感,喜欢故弄玄虚,可如果不那样的话,五十岁时也就不会如此明智。
标题:Python3 For Else 语句
Python3 For Else 语句
#!/usr/bin/python3 numbers = [11,33,55,39,55,75,37,21,23,41,13] for num in numbers: if num%2 == 0: print ('the list contains an even number') break else: print ('the list doesnot contain even number')