str() and repr(): Strings and floating point numbers, have two distinct representations.,,s = 'Hello,
str() and repr(): Strings and floating point numbers, have two distinct representations.,,s = 'Hello,
s = 'Hello, world.'print str(s)print repr(s)print str(0.1)print repr(0.1)x = 10 * 3.25y = 200 * 200s = 'The value of x is ' + repr(x) + ', and y is ' + repr(y) + '...'print s
相关内容
- Big number,bignumber,print 999999
- Bitwise or,bitwiseor,x = 1
- Anything with a non-zero length is true, empty sequences are false,
- Complex Numbers: Multiply,numbersmultiply,print (2+1j)
- Complex numbers: represented as two floating point numbers,,#Comple
- Int: modulus (remainder), power,modulusremainder,a = 3
- Lists can be written as a list of comma-separated values (items) betw
- Define and use integer,defineinteger,print 2+2
- Int value demo,intvaluedemo,number = inp
- Make 2 sets out of sequences: Intersection, Union, Difference,,X =
评论关闭