#1 print函数(python版本3.3.5):

>>> help(print)
Help on built-in function print in module builtins:

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.

  >>> print('hello world')
  hello world

#2 字符串:

  >>> print('i love i')
  i love i

  >>> print('i love '+'i')  #连接两个字符串
  i love i

  >>> print('i love '*8)  #重复打印字符串
  i love i love i love i love i love i love i love i love

  >>> print('i love\n'*8)  #\n 换行符
  i love
  i love
  i love
  i love
  i love
  i love
  i love
  i love

#3 数值(整型):

  >>> print(5+3)
  8

  >>> 5+3
  8

  >>> 98765432123456789*98765432123456789
  9754610582533150213077274750190521

Python-2 print的更多相关文章

  1. python中print后面加逗号

    python中print输出一行,如果想多次输出的内容不换行,可以在print后面加逗号 例如 每个输出一行 phrase = "abcdefg" # Add your for l ...

  2. python中print()函数的“,”与java中System.out.print()函数中的“+”

    python中的print()函数和java中的System.out.print()函数都有着打印字符串的功能. python中: print("hello,world!") 输出 ...

  3. Python之print()函数

    1. 输出字符串 >>> str = 'Hello World' >>> print (str) Hello World 2. 格式化输出整数 支持参数格式化 &g ...

  4. Python中print字体颜色的设置

    Python中print字体颜色的设置 实现过程:       终端的字符颜色是用转义序列控制的,是文本模式下的系统显示功能,和具体的语言无关.       转义序列是以ESC开头,即用\033来完成 ...

  5. 【313】python 中 print 函数用法总结

    参考:python 中 print 函数用法总结 参考:Python print() 函数(菜鸟教程) 参考:Python 3 print 函数用法总结 目录: 字符串和数值类型 变量 格式化输出 p ...

  6. Python之print详解

    Python之print详解 http://www.jb51.net/article/55768.htm   print的一些基本用法,在前面的讲述中也涉及一些,本讲是在复习的基础上,尽量再多点内容. ...

  7. Python中print()函数不换行的方法

    一.让print()函数不换行 在Python中,print()函数默认是换行的.但是,在很多情况下,我们需要不换行的输出(比如在算法竞赛中).那么,在Python中如何做到这一点呢? 其实很简单.只 ...

  8. Python 3 print 函数用法总结

    Python 3 print 函数用法总结 1. 输出字符串和数字 print("runoob")    # 输出字符串 runoob print(100)            ...

  9. Python中print用法里面% ,"%s 和 % d" 代表的意思

    Python 编程 里面% . "%s 和 % d" 代表的意思 %s,表示格化式一个对象为字符 %d,整数 "Hello, %s"%"zhang3& ...

  10. 对Python中print函数参数的认识

    输出函数是最常用的,对print()参数的准确认识尤为重要. sep='':sep参数表示函数中不同value的分隔符,默认为一个空格. end='':end参数表示函数结尾的处理,默认换行. 例如: ...

随机推荐

  1. CodeForces 239A. Triangle

    Link:  http://codeforces.com/contest/407/problem/A 给定直角三角形的2个直角边a,b.求在直角坐标系中,是否存在对应的直角三角形,使得三个定点都在整点 ...

  2. Facebook 网络模拟工具 ATC部署及使用

    废话引用: Facebook此前开源了增强网络流量控制工具 ATC,能利用WiFi网络模拟各种移动网络,测试智能手机和APP在不同国家地区和应用环境下的性能表现.ATC能够模拟2G.2.5G(Edge ...

  3. ubantu svn 安装、卸载、配置hooks

    1.安装之前先看是否已经安装了 svn -version 若已经安装会有以下提示,若没有安装,进行下一步 若想卸载了执行命令 ( sudo apt-get remove --purge subvers ...

  4. Smart_Script

    target_type Name Value target_param1 target_param2 target_param3 target_x target_y target_z target_o ...

  5. Java后台判断请求来自PC端还是移动端

    核心代码

  6. (转)Image Segmentation with Tensorflow using CNNs and Conditional Random Fields

    Daniil's blog Machine Learning and Computer Vision artisan. About/ Blog/ Image Segmentation with Ten ...

  7. javascript跨域、iframe跨域访问

    1.window 对象 浏览器会在其打开一个 HTML 文档时创建一个对应的 window 对象.但是,如果一个文档定义了一个或多个框架(即,包含一个或多个 frame 或 iframe 标签),浏览 ...

  8. node.js环境安装,及连接mongodb测试

    1.node.js环境安装 npm config set python python2.7npm config set msvs_version 2013npm config set registry ...

  9. 前端JavaScript规范

    前端JavaScript规范 http://www.imooc.com/article/1402 http://greengerong.com/blog/2015/05/09/qian-duan-ja ...

  10. 编写一个Singleton程序(单例)

    public class Test { private static Test test = new Test(); private Test(){}//构造方法私有化 private static ...