✨ ashe
is a super extension of Python.
-
System
- size
-
Dict
- merge
- remove
-
List
- reverse
- max_count
-
String
- find
-
File
- read
- write
-
Date
- today
- yesterday
- tomorrow
- week
- year
- get_interval_days
- get_week_days
- get_month_days
pip install ashe -U
from ashe import *
# get size
n = 1
print(size(n))
# 28
# reverse the list
l = [1, 2, 3]
print(reverse(l))
# [3, 2, 1]
# remove key and value from dict
d = {"a": 1, "b": 2}
print(remove("a", d))
# {'b': 2}
# get today and yesterday
print(today())
# 2022-10-23
print(yesterday())
# 2022-10-22
print(get_interval_days(interval=3))
# ["2022-10-21", "2022-10-22", "2022-10-23"]
- Why reverse(list)
not list.reverse()
?
- Because len(list)
not list.len()
.
I find built-in method named
reversed
🤦.