[ 每日一课】 Python官方文档 1 -- 简介

Python简介:

1. 由 Guido van Rossum在1989年编写的一个编程语言。优雅, 明确, 简单。  

2. 适合开发网络应用, 小工具

3. 解释型语言, 没有编译和链接, 可以节省程序开发过程中的大量时间

4. 缺点: 速度慢, 不能加密。


Python 格式

缩进区分

单行注释: #

编码:  #-*- coding: utf-8 -*-


Python输入/输出

print("hello, world"),  print('hello, world')

print('this', 'is', 'a', 'new', 'world')

print(‘%s', %num)

input([prompt])


Notes:

1. Python 区分大小写。

2. Python3.3以后, input()和raw_input()合并, If the prompt argument is present, it is written to standard output without a trailing newline. The function then reads a line frominput, converts it to a string  

3. 参数格式化输出

  • #%x --- hex 十六进制
  • #%d --- dec 十进制
  • #%o --- oct 八进制
  • #%s --- 字符串
  • #%f --- float 浮点数



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值