Python is one of the most preferred languages out there. Its brevity and high readability makes it so popular among all programmers.
So here are few of the tips and tricks you can use to bring up your Python programming game.
x, y = 10, 20
x, y = y, x
print(“Reverse is”, a[::-1])
n = 10
result = 1 < n < 20
result = 1 > n <= 9
Geeks, For, Geeks = range(3)
from collections import Counter
def is_anagram(str1, str2):
return Counter(str1) == Counter(str2)