g****g 发帖数: 1828 | 1 >>> print "bucky is " + str(num)
bucky is 18
>>> num2=32
>>> print " my mom is " + `num2`
my mom is 32
>>> print " my mom is " + ` num2`
>>> print " my mom is " + repr(num2)
my mom is 32
>>> print " my mom is " + repr( num2)
my mom is 32
raw_input() converts everything including numbers to string.
input() inputs only numbers.
>>> 'bucky'[3]
'k'
>>> 'bucky '*10
'bucky bucky bucky bucky bucky bucky bucky bucky bucky bucky '
>>> [21]*10
[21, 21, 21, 21, 21, 21, 21, 21, 21, 21]
>>> name='ro |
X****r 发帖数: 3557 | 2 What are you doing here?
【在 g****g 的大作中提到】 : >>> print "bucky is " + str(num) : bucky is 18 : >>> num2=32 : >>> print " my mom is " + `num2` : my mom is 32 : >>> print " my mom is " + ` num2` : >>> print " my mom is " + repr(num2) : my mom is 32 : >>> print " my mom is " + repr( num2) : my mom is 32
|
c*******9 发帖数: 6411 | 3 思考猪, it seems you know everyting ( every programming language ), do you
always have chance to use them at work? |
X****r 发帖数: 3557 | 4 No, I don't know every programming language ;-)
I only know some C, C++ and Javascript, limited Java,
a little bit Python and that's all. Yes I always have chance to use
them at work, except for C/C++, ironically :)
you
【在 c*******9 的大作中提到】 : 思考猪, it seems you know everyting ( every programming language ), do you : always have chance to use them at work?
|
c*******9 发帖数: 6411 | 5 you do not use c/c++? what is your primary language at work? or maybe you
are a hardware engineer like thrust? |
t****t 发帖数: 6806 | 6 no he is not. we hardware engineers use c/c++!
【在 c*******9 的大作中提到】 : you do not use c/c++? what is your primary language at work? or maybe you : are a hardware engineer like thrust?
|
X****r 发帖数: 3557 | 7 JavaScript (so obviously I'm not a hardware engineer).
you
【在 c*******9 的大作中提到】 : you do not use c/c++? what is your primary language at work? or maybe you : are a hardware engineer like thrust?
|
c*******9 发帖数: 6411 | 8 Javascript for adobe development? |
X****r 发帖数: 3557 | 9 Javascript in web browsers.
【在 c*******9 的大作中提到】 : Javascript for adobe development?
|