Computer Science, asked by shineyu3694, 11 months ago

What are python decorators

Answers

Answered by Anonymous
0

Python has an interesting feature called decorators to add functionality to an existing code.

This is also called metaprogramming as a part of the program tries to modify another part of the program at compile time

Answered by harry366784
0

Explanation:

Python dictionaries are (apparently) random sequences that contain a set of keys, where each key points to a value and is associated with that value, hence the expression "associative arrays" sometimes found in other languages. Dictionaries act just like real life dictionaries, where the keyis the word and the value is the word's definition.

An English dictionary, for example, may contain hundreds of thousands of words. Because each word is put into the dictionary in a well defined way, the word and its definition can be found very quickly. In any real life dictionary words can be added or deleted at any time and the definition of an existing word can be changed. Although an English dictionary may appear to contain several definitions of the same word, "house (noun)" and "house (verb)" are separate entries. Python's dictionaries are conceptually similar, but the ordering of the keys may seem random. However, entries are put into Python's dictionaries in a well defined way, so that each key and its associated value may be retrieved very quickly.

Similar questions