Back

jjjjjjjjjjjjjjj



Rhccj4/10/2025, 12:03:55 AM
def find_most_common_element(data):
"""Finds the most common element in a list."""
counts = {}
for element in data:
counts[element] = counts.get(element, 0) + 1
most_common = None
max_count = 0
for element, count in counts.items():
if count > max_count:
most_common = element
max_count = count
return most_common
Lilia4/10/2025, 12:03:55 AM
njk

Rhccj4/10/2025, 12:03:55 AM
import re
text = "Hello, my number is 123-4567."
match = re.search(r'\d{3}', text)
if match:
print(match.group())
else:
print("No phone number found.")