skip to main
|
skip to sidebar
Python 3000 中譯
2009年5月4日 星期一
Assign values simultaenous
指定變數 x,y,z 均為0
x=y=z=0
print("x now is "+str(x))
print("y now is "+str(y))
print("z now is "+str(z))
定義變數 a,b
a=1
b=2
指定變數值
a,b=b,a
print("a now is "+str(a))
print("b now is "+str(b))
結果
x now is 0
y now is 0
z now is 0
a now is 2
b now is 1
沒有留言:
張貼留言
較新的文章
較舊的文章
首頁
訂閱:
張貼留言 (Atom)
追蹤者
網誌存檔
▼
2009
(9)
▼
5月
(9)
Define a function and return value
For syntax
Defin multiline string with """
Complex varible real and imag portion
Do integer division and get integer result use //
Assign values simultaenous
Use python as calculator
Float to Hexdecimal and Reverse
Integer Conversion Function
關於我自己
Unknown
檢視我的完整簡介
沒有留言:
張貼留言