What is the purpose of AS in Python?

0

Please help me regarding this. Please explain to me why, and how AS works in Python.

    
asked by anonymous 17.04.2018 / 23:39

1 answer

2

It is as if you were giving a nickname to something, for example except Exception as E , or, import serial as ser .

Because sometimes it's much easier to name something than to have to type her name several times, imagine for example having to type matplotlib.pyplot every time you work with graphics, it's much easier to name her 'plt ', than to have to write it all the holy time to use it.

    
17.04.2018 / 23:48