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

查看所有标签

The Art and Science of CSS

The Art and Science of CSS

Jonathan Snooks、Steve Smith、Jina Bolton、Cameron Adams、David Johnson / SitePoint / March 9, 2007 / $39.95

Want to take your CSS designs to the next level? will show you how to create dozens of CSS-based Website components. You'll discover how to: # Format calendars, menus and table of contents usin......一起来看看 《The Art and Science of CSS》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

MD5 加密
MD5 加密

MD5 加密工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具