python基础

1.语言基本知识

1.1 编译器

1.1.1 定义

人生苦短,我用python

cython

机器只能理解机器语言

程序员编写代码(java c c++ c# python go 等)------->翻译成机器语言------>计算机执行

编译器:将其他语言翻译成机器语言的工具

1.1.2 编译器的翻译方式

编译

解释

区别:翻译时间点的不同

当翻译器以解释方式进行运行的时候,叫做解释器

1.1.3 语言的分类

编译型语言:执行速度很快

解释型语言:跨平台

 

2.解释型语言-python

2.1 输出-print

def print(self, *args, sep=' ', end='\n', file=None): # known special case of print
    """
    print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)
    
    Prints the values to a stream, or to sys.stdout by default.
    Optional keyword arguments://可选参数
    file:  a file-like object (stream); defaults to the current sys.stdout.// 基本不用管
    sep:   string inserted between values, default a space.// 分割符,默认是空格
    end:   string appended after the last value, default a newline.// 换行符
    flush: whether to forcibly flush the stream.
    """
    pass

2.2 注释

2.2.1 单行注释

# 

快捷方
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值