Check for Anagrams in Python

Check for Anagrams in Python Two strings are anagrams if they contain the same characters in the same frequency, just in a different order. For example, “listen” and “silent” are anagrams. Solution 1: Sort and Compare def is_anagram(s1, s2): return sorted(s1.lower()) == sorted(s2.lower()) print(is_anagram(“listen”, “silent”)) # True print(is_anagram(“hello”, “world”)) # False Solution 2: Using Counter…

Read More

Writing custom module in ansible

While Writing custom module in ansible in ansible you need to setup ansible environment.  If you are not aware from it you can follow step by step instruction  in my post “Getting started with ansible“ After successfully setup ansible environment create your module directory inside “library/”. I have created module directory named “custom_module/” and module…

Read More
Verified by MonsterInsights