良い方法:ストライピング文字列私はタイプの文字列から数値を抽出したい文字列 ストライピングの
Var = '0x456;//used for fooing'
##I do it this way but I am sure there is much better way of doing this :
v = Var.split(';')
c= v[0]
##use c for further processing ....
与えヴァールから部分0x456を抽出する良い方法は何ですか?
'c = Var.split( ';')[0]'? –
「より良い」を定義します。 – NPE
あなたのソリューションは読書に最適です。 – Jason