Python‎ > ‎keywords‎ > ‎

as


Definition
The keyword save method as other chosen name.

Syntax
as

Parameters
N/A

Examples
The keyword save the import operator as op.
 >>> import operator as op
>>> op.add(2,4)
6
>>> op.add(3,5)
8
>>> op.concat("Python", "Lake")
'PythonLake'

The return is:
 >>> from decimal import Decimal as Dec
>>> Dec(2.11).adjusted()
0
>>> Dec(222.100).as_tuple()
DecimalTuple(sign=0, digits=(2, 2, 2, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 4, 3, 1, 5, 6, 5, 8, 1, 1, 3, 9, 1, 9, 1, 9, 8, 5, 1, 3, 0, 3, 1, 0, 0, 5, 8, 5, 9, 3, 7, 5), exponent=-45)
>>> 

 The tensorflow run the String.
import tensorflow as tf
c = tf.constant('Python Lake')

Tensor("Const:0", shape=(), dtype=string) 




























Comments