automated terminal push
This commit is contained in:
20
utils.py
Normal file
20
utils.py
Normal file
@@ -0,0 +1,20 @@
|
||||
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}"
|
||||
Reference in New Issue
Block a user