Python oct() 函数

Python 3 教程 · 2019-02-05 11:44:08

描述

oct() 函数将一个整数转换成8进制字符串。

语法

oct 语法:

oct(x)

参数说明:

  • x -- 整数。

返回值

返回8进制字符串。

实例

以下实例展示了 oct 的使用方法:

>>>oct(10) '012' >>> oct(20) '024' >>> oct(15) '017' >>>

点击查看所有 Python 3 教程 文章: https://www.codercto.com/courses/l/10.html

查看所有标签

C++ How to Program (5th Edition) (How to Program)

C++ How to Program (5th Edition) (How to Program)

Harvey & Paul) Deitel & Associates / Prentice Hall / 2005-01-05 / USD 98.00

With over 250,000 sold, Harvey and Paul Deitel's C++ How to Program is the world's best-selling introduction to C++ programming. Now, this classic has been thoroughly updated! The Deitels' groundbreak......一起来看看 《C++ How to Program (5th Edition) (How to Program)》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

html转js在线工具
html转js在线工具

html转js在线工具