Python is an interpreted high-level programming language for general-purpose programming. Created by Guido van Rossum and first released in 1991, Python has a design philosophy that emphasizes code readability, notably using significant whitespace. It provides constructs that enable clear programming on both small and large scales.
Python is known for its beautiful short solutions to rather complex problems. This characteristic of Python often comes out while programming.
Take the example of Pythonic solution to this Google’s Question:
QUESTION: Given a string as your input, delete any reoccurring character, and return the new string.
Example Input: aaaaffffhhhh
Example Output: afh
Solution:
print(‘’.join(map(str,set(list(input(“Enter reoccurring characters”))))))
Sample Run:
>>>print(‘’.join(map(str,set(list(input(“Enter reoccurring characters”))))))
>>>Enter reoccurring characters
aaabbbcccc
>>>abc