40
suic
16 39 57
9966/ 10664
Last seen 1 day ago
Member for 9 years, 11 months, 3 days
Difficulty Advanced
Best reviews / Newest reviews
First-DarkhanShakhanov
Hi, you can use __frozenset__. return ','.join(sorted(frozenset(a.split(',')) & frozenset(b.split(',')))) Edit: Or even __set__: return ','.join(sorted(set(a.split(',')) & set(b.split(',')))) More
First-madfatcat
Hi, look at [Counter](https://docs.python.org/3.4/library/collections.html#collections.Counter). More
Second-gileadslostson 1
Hi, look at __collections.Counter__. More
First-more_more_for
Hi, `data` is redundant: return [i for i in data if data.count(i) > 1] More
First-tigelane
Hi, it's noisy. Comments make it harder to read. More
Iterate thru dictionary keys-johnhaines
Hi, comment formatting makes is less readable. It looks like one big chunk of text. This is more readable # Dictionary containing all the character combinations numeral = {1000:"M",900:"CM",500:"D",400:"CD",100:"C",90:"XC",50:"L",40:"XL",10:"X",9:"IX",5:"V",4:"IV",1:"I"} Or: More
First-MaikSchoepe 8
Hi, I like you solution except from it's repetitive nature, which you can avoid: base = "I"*data rs = (("I"*5, "V"), ("V"*2, "X"), ("X"*5, "L"), ("L"*2, "C"), ("C"*5, "D"), ("D"*2, "M"), ("DCCCC", "CM"), ("CCCC", "CD"), More
Ugly-ferdaszewski
Hi, when `data` is too short you don't need to loop over characters: if len(data) < 10: return False Once `num_upper and num_lower and num_digits` is true you don't need to continue else: num_digits += 1 if num_upper and num_lower and num_digits: More
Non-Uniques w/ List Comprehension-aegarpyke
Hi, `nonuiques` is redundant. You can return the comprehension. More
Third-HiroKano
Hi, `data` is redundant: return [i for i in data if data.count(i) > 1] More
digits_multiplications_txt-mmngreco 1
Hi, you can use _reduce()_ here: return reduce(int.__mul__, map(int, num_txt)) More
three_words_binary-mmngreco 1 1
Hi, `lambda` is redundant: for e in map(unicode.isalpha, words.split()) More
First-mmngreco 1
Hi, you could use nest comprehension for this. More
days_between_lambda_date-mmngreco 1 1
Hi, that `lambda` is not necessary. You can use `*` for unpacking, e. g.: days(*date1) More
monkey_typing_twolines-mmngreco 1 1
Hi, generator expression would be nicer. Or you can write: return sum(map(text.lower().__contains__, words)) More
secret_message_twofors-mmngreco 1 1
Hi, __str__ is immutable in python, so it's not the best type for accumulation. Tip: Look at _filter()_. More
First-OksanaSh
Hi, You need 1. `else` branch on line 6. 2. the last `if`. 3. _re_ for this mission. Look at _str.islower()_, _str.isupper()_, _str.isdigit()_. def checkio(data): if len(data) < 10: return False first_condition = re.search("[a-z]+", data) seco More
First-Ciadhran
Hi, you don't need that `lambda`. Look at `int.__mul__`. More
First-Ciadhran
Hi, look at _all()_: return all(x in string.lower(text) for x in string.ascii_lowercase) More
First-Ciadhran
Hi, you can use nested comprehension and _sum()_, e. g.: return sum(len([y for y in seq[seq.index(x):] if y < x]) for x in seq) or you can write it [this way](http://www.checkio.org/mission/count-inversions/publications/suic/python-3/sum-sum/). More