2006年10月23日 星期一 17:56
<http://www.google.com/search?hl=zh-CN&newwindow;=1&oq;=ruguo&sa;=X&oi;=pinyin&resnum;=0&ct;=result&cd;=1&q;=%E5%A6%82%E6%9E%9C&spell;=1>如果 x = '123abc' C语言 int val = atoi(x) ; // val = 123 那么 Python 对应的简单用法? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20061023/2f86a8e3/attachment.html
2006年10月23日 星期一 20:46
int,不过你这里有非数字,不能转到10进制(python不过自动忽略),可以转换为16进制 int('123abc', 16)
在06-10-23,jiyong wu <jiyong.wu在gmail.com> 写道:
>
>
> <http://www.google.com/search?hl=zh-CN&newwindow;=1&oq;=ruguo&sa;=X&oi;=pinyin&resnum;=0&ct;=result&cd;=1&q;=%E5%A6%82%E6%9E%9C&spell;=1>如果 x = '123abc'
> C语言
> int val = atoi(x) ; // val = 123
>
> 那么 Python 对应的简单用法?
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
--
茫茫人海,你是我的最爱
-------------- 下一部分 --------------
一个HTML附件被移除...
URL: http://python.cn/pipermail/python-chinese/attachments/20061023/e0c08e28/attachment.html
Zeuux © 2025
京ICP备05028076号