import os
def get_file_extension(file_path):
_, file_extension = os.path.splitext(file_path)
return file_extension
def reverse_string(s):
return s[::-1]
def common_elements(lst1, lst2):
return list(set(lst1) & set(lst2))
def chunk_list(lst, size):
return [lst[i:i + size] for i in range(0, len(lst), size)]
from urllib.parse import urlparse
def get_domain_name(url):
return urlparse(url).netloc
def filter_even_numbers(lst):
return [num for num in lst if num % 2 == 0]