T
T
tarp202021-07-29 15:25:07
Python
tarp20, 2021-07-29 15:25:07

Decorators in Python?

there is

input = {
    'Task1': {'delay':1, 'text': 'first task'},
    'Task2': {'delay': 2, 'text': 'second task'}
    }


how to use a decorator to convert to

[16130385.43543] - first
[16130365.54454] - second

timestamp during each print in seconds and text in the field Is it possible somehow differently and the loop itself should be in a decorator or in a function? text


input

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question