- 1

Lower Characters Challenge [answer with a code] (05)

how many lower? mQmPtphqGrboHhmgaqVhCdwTwignlQvjIopDqVpgaNrwkAzVcnkHyNiPdSmgJmgrPiMjpnjdbuPucHnouwfKuPcybromnmbvfxJqRnnOvWsceZeYzRyqnkaaFsffjenxoIhqHnIzorlOdwZoxYmAuNwNnRppguwidvbtOqdbUngpZdbGqwYjfpLzPjRtwVwEqBbYmCqbKwuziCoEwPsIkJgruTbhdyWpvPztAodufjZxLaZcUeFaklSmeRfolohVbXoDfIqMqgIrQhzedqZlFwaBndQkQexBdLsCfXebrEfiOnSgYquyaqohxoDmLdDhwoOpgtkuRzeYziuvnuvnUuOtqasZueYpKfAkmKcJcWeocQvJguVsZfVovgrztAiryZivHqyMjoLyJdklKifmoWeOjVnogiiaBzDfrsWlOeAzPxltamqQiujZrpZrUcIlyktdJbhmNpDbltOlLnAqVhcxgObghpdcScgIiayqygUgwati

16th Jun 2017, 7:57 PM
Ulisses Cruz
Ulisses Cruz - avatar
8 Respuestas
+ 7
16th Jun 2017, 9:01 PM
Dennis
Dennis - avatar
16th Jun 2017, 8:17 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 3
@kuba You can shorten your code even further by getting rid of the variable txt and putting the bare value inline and also using the islower() method instead of a comparison string. print(len([i for i in 'mQmPtphqGrboHhmgaqVhCdwTwignlQvjIopDqVpgaNrwkAzVcnkHyNiPdSmgJmgrPiMjpnjdbuPucHnouwfKuPcybromnmbvfxJqRnnOvWsceZeYzRyqnkaaFsffjenxoIhqHnIzorlOdwZoxYmAuNwNnRppguwidvbtOqdbUngpZdbGqwYjfpLzPjRtwVwEqBbYmCqbKwuziCoEwPsIkJgruTbhdyWpvPztAodufjZxLaZcUeFaklSmeRfolohVbXoDfIqMqgIrQhzedqZlFwaBndQkQexBdLsCfXebrEfiOnSgYquyaqohxoDmLdDhwoOpgtkuRzeYziuvnuvnUuOtqasZueYpKfAkmKcJcWeocQvJguVsZfVovgrztAiryZivHqyMjoLyJdklKifmoWeOjVnogiiaBzDfrsWlOeAzPxltamqQiujZrpZrUcIlyktdJbhmNpDbltOlLnAqVhcxgObghpdcScgIiayqygUgwati' if i.islower()]))
16th Jun 2017, 8:52 PM
ChaoticDawg
ChaoticDawg - avatar
+ 3
@ChaoticDawg Yep, you're right. I wasn't sure if it was an intrinsic method of Python, not of the strings module - thanks!
16th Jun 2017, 9:11 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 1
https://code.sololearn.com/cVJ3XKeQFzVa/?ref=app Probably the shortest I can get it in C++
16th Jun 2017, 8:14 PM
Dennis
Dennis - avatar
0
@Dennis I was just looking into a ruby solution. lol Oh well. That's probably about as good as it gets.
16th Jun 2017, 9:06 PM
ChaoticDawg
ChaoticDawg - avatar
- 1
The shortest code wins.
16th Jun 2017, 7:57 PM
Ulisses Cruz
Ulisses Cruz - avatar
- 1
Who gives less?
16th Jun 2017, 8:56 PM
Ulisses Cruz
Ulisses Cruz - avatar