21 lines
480 B
Python
21 lines
480 B
Python
|
|
import calendar
|
||
|
|
import random
|
||
|
|
|
||
|
|
def randomizeArray(arr):
|
||
|
|
"""
|
||
|
|
Returns a new randomized array without modifying the original.
|
||
|
|
"""
|
||
|
|
new_arr = arr[:] # Create a copy of the original array
|
||
|
|
random.shuffle(new_arr)
|
||
|
|
return new_arr
|
||
|
|
|
||
|
|
def convertMonthNumberMonthLong(month_number):
|
||
|
|
|
||
|
|
if not 1 <= month_number <= 12:
|
||
|
|
|
||
|
|
raise ValueError("Invalid month number")
|
||
|
|
|
||
|
|
month_name = calendar.month_name[month_number].lower().strip()
|
||
|
|
|
||
|
|
return f"{month_name}"
|