0

Where using as?

12th May 2017, 4:07 PM
Даниил Горелов
Даниил Горелов - avatar
2 Answers
+ 6
You can use "as" in import statements to shorten the way you recall oftenly used methods. For example: from random import choice as c lets you use c() instead of random.choice() each time you use it in the code. where as: import numpy as np lets you use np.method_name() instead of numpy.method_name()
12th May 2017, 7:28 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 4
Can you please write in English Bro so that everybody can understand and answer your queries.
12th May 2017, 4:15 PM
Vishnu ks
Vishnu ks - avatar