41
Awesome Team
Tinus Trotyl
Last seen 2 hours ago
Member for 7 years, 2 months, 14 days
Difficulty Normal
A little bit of Python with greetings from the Netherlands.
In contrast to the list.sort() method, the sorted() function accepts any iterable, so you didn't need to 'list' first.
See also :
[Sorting Basics](https://docs.python.org/3/howto/sorting.html?highlight=sorted)
More
Hi,
Some thoughts about the empty string case :
I did ask myself this a few times over too and I think string can be empty (it's still a string, you can refer to it, give it a name etc.) but an empty sentence ?
Which is (in case of a string) the part represented between the quotes, right ?
More
Hey . . . you can do things like `min(['1:13', '1:26', '1:11'])` ?
Thanks, learned something new today :-)
More
Hi,
As suplement to your question (if this is what you mean) : "Why python doesn't have enum ?"
You can use "range()" also for numbering tasks e.g.
(HIGH_CARD,
ONE_PAIR,
TWO_PAIR,
THREE_OF_KIND,
STRAIGHT,
FLUSH,
FULL_HOUSE,
FOUR_OF_KIND,
STRAIGH
More
Whow . . . NICE . . . ! ! !
You did what I looking for (connecting an logical output value to add/discard - or remove in your case, line 9 ÷ 13).
Clever use of `and not`, you taught me something new today, thanks :)
More
Hi,
Why didn't you simply `max(data .... )` , no order to reverse, no index . . . ?
More
Eureka . . .You've got me some rook breakers in complexified pythoneering :-)
More
Btw, cool list of strings to list of sets conversion :)
More
anagram(x) returns a sorted list of the lowercase charaters w/o spaces from string for easy verifying.
More
Hey, cool . . . and you could even rewrite the whole functionbody like :
return [data[i] for i in range(len(data)) if data[i] in data[:i] + data[i+1:]]
More
Replacing args[0] by list(args[0]) realy did it :-)
More