Tips & Tricks in python
class MyName:
Geeks, For, Geeks = range(3)
print(MyName.Geeks)
print(MyName.For)
print(MyName.Geeks)
Tips & Tricks in python
class MyName:
Geeks, For, Geeks = range(3)
print(MyName.Geeks)
print(MyName.For)
print(MyName.Geeks)
Tips & Tricks in python
import sys
x = 1
print(sys.getsizeof(x))
Tips & Tricks in python
from collections import Counter
def is_anagram(str1, str2):
return Counter(str1) == Counter(str2)
# or without having to import anything
def is_anagram(str1, str2):
return sorted(str1) == sorted(str2)
print(is_anagram('geek', 'eegk'))
print(is_anagram('geek', 'peek'))
Tips & Tricks in python
test = [1, 2, 3, 4, 2, 2, 3, 1, 4, 4, 4]
print(max(set(test), key = test.count))
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us