Янислав обнови решението на 11.03.2014 00:48 (преди над 10 години)
+def wow_such_much(start, end):
+ result = []
+ for number in range(start, end):
+ if number % 15 == 0:
+ result.append("suchmuch")
+ continue
+ if number % 5 == 0:
+ result.append("much")
+ continue
+ if number % 3 == 0:
+ result.append("such")
+ continue
+ result.append(str(number))
+ return result
+def count_doge_words(string):
+ words = string.split(" ")
+ count = 0
+ for word in words:
+ if word in ("such","lol","wow","so","very","much"):
+ count += 1
+ return count
- http://legacy.python.org/dev/peps/pep-0008/#blank-lines !!
-
if-elif-..-else
конструкция тук би била по-подходяща от употребата наcontinue