>>> locale.setlocale(locale.LC_TIME, 'ru_RU.UTF-8')
'ru_RU.UTF-8'
>>> datetime.now()
datetime.datetime(2019, 2, 3, 12, 44, 19, 396804)
>>> datetime.now().strftime('%B')
'февраля'
path = "fields.components.name".split('.')
json = {'fields': {'components': {'id': '10437', 'name': 'Bug'}}}
for p in path:
json = json[p]
print(json)
keys = "abcd"
dd = {"a": 1, "b": 2, "c": 3, "d": 4}
for key in keys:
print(dd[key])
def get_row_len(row, col, cell_index):
if type((cell_index / row) - col)) == float:
return -1
//////////
isinstance(1.1, float)
>>> True
def http_method(urls):
source = ["http://", "https://"]
my_list = []
for data in source:
my_list += [data + urls]
print(my_list)
def http_method(urls):
source = ["http://", "https://"]
return [data + urls for data in source]
python3.5 my-file.py