Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Python tricks

by rsFalse (Hermit)
on Mar 04, 2019 at 13:38 UTC ( #1230838=note: print w/replies, xml ) Need Help??


in reply to Python tricks

On IX. Some variants with avoiding self repeating:
sub is_anagram { my %hash; map { $hash{ join '', sort split '' } ++ } @_; return 2 > keys %hash ? 'True' : 'False'; }
sub is_anagram { return qw( True False )[ eval join 'cmp', map "'$_'", map { join ' +', sort split '' } @_ ]; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1230838]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2020-01-21 23:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?