•        Python : 3.7.3
  •          OS : Ubuntu 18.04.2 LTS
  •         IDE : pycharm-community-2019.1.3
  •       Conda : 4.7.5
  •    typesetting : Markdown

 

code

coder@ubuntu:~$ source activate py37
(py37) coder@ubuntu:~$ ipython
Python 3.7.3 (default, Mar 27 2019, 22:11:17)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.5.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: goods = ("络石", "木莲", "忍冬", "泽泻", "酸模") In [2]: output_format = "%s - %s - %s - %s - %s" In [3]: output_format % goods
Out[3]: '络石 - 木莲 - 忍冬 - 泽泻 - 酸模' In [4]: exit
(py37) coder@ubuntu:~$ conda deactivate
coder@ubuntu:~$

 

resource

  • [文档 - English] docs.python.org/3
  • [文档 - 中文] docs.python.org/zh-cn/3
  • [规范] www.python.org/dev/peps/pep-0008
  • [规范] zh-google-styleguide.readthedocs.io/en/latest/google-python-styleguide/python_language_rules
  • [源码] www.python.org/downloads/source
  • [ PEP ] www.python.org/dev/peps
  • [平台] www.cnblogs.com
  • [平台] gitee.com

 


Python具有开源、跨平台、解释型、交互式等特性,值得学习。

Python的设计哲学:优雅,明确,简单。提倡用一种方法,最好是只有一种方法来做一件事。

代码的书写要遵守规范,这样有助于沟通和理解。

每种语言都有独特的思想,初学者需要转变思维、踏实践行、坚持积累。

Python3基础 tuple 使用格式化字符串进行输出的更多相关文章

  1. python 使用json.dumps() 的indent 参数,获得漂亮的格式化字符串后输出

    想获得漂亮的格式化字符串后输出,可以使用json.dumps() 的indent 参数.它会使得输出和pprint() 函数效果类似 >>> data {'age': 4, 'nam ...

  2. Python3基础之数据类型(字符串和列表)

    1.Python字符串方法 1.1.如何在Python中使用字符串 a.使用单引号(') 用单引号括起来表示字符串,例如: str1="this is string"; print ...

  3. Python3基础 tuple 通过拆分元组向元组中加入新的元素

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  4. Python3基础 tuple 通过拆分元素 把元组的数据删除

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  5. Python3基础 str 通过拆分字符串与插入新的内容形成新的字符串

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  6. Python3基础 tuple 使用通配符*进行拆包 简单示例

             Python : 3.7.3          OS : Ubuntu 18.04.2 LTS         IDE : pycharm-community-2019.1.3    ...

  7. Python3基础 tuple(list) 改变list元素的内容时,元组的id值不变

             Python : 3.7.3          OS : Ubuntu 18.04.2 LTS         IDE : pycharm-community-2019.1.3    ...

  8. Python3基础 tuple list转为tuple

             Python : 3.7.3          OS : Ubuntu 18.04.2 LTS         IDE : pycharm-community-2019.1.3    ...

  9. Python3基础 print与,结合 一次输出多个数据

    镇场诗:---大梦谁觉,水月中建博客.百千磨难,才知世事无常.---今持佛语,技术无量愿学.愿尽所学,铸一良心博客.------------------------------------------ ...

随机推荐

  1. JMeter java.net.BindException: Address already in use: connect

    原文:https://blog.csdn.net/macwhirr123/article/details/77199057 出现原因:TCP/IP连接数不够或TIME_WAIT中存在很多链接,导致吞吐 ...

  2. Yii2 路由美化

    一.美化路由形式 如:localhost/index.php?r=site/index 这种路由形式对SEO不友好,那么是否可以对路由进行一下美化呢?在Yii2中我们可以将路由必成以下的形式: 如:l ...

  3. 【Spring Boot】Spring Boot之跨域解决方案

    一.什么是跨域 跨域,指的是从一个域名去请求另外一个域名的资源.即跨域名请求!跨域时,浏览器不能执行其他域名网站的脚本,是由浏览器的同源策略造成的,是浏览器施加的安全限制. 跨域的严格一点来讲就是只要 ...

  4. Linux系统 jboss/Tomcat服务器pdf文件乱码问题

    1.新搭建的环境,但是没有字符集,在windows上的电脑上复制了一份宋体, 字体C:\WINDOWS\FONTS\simsun.ttc(也就是宋体,大小为10M),把他重命名为 simsun.ttf ...

  5. Python标准库-数字的处理函数(math模块)

    Python标准库-数字的处理函数(math模块) 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. #!/usr/bin/env python #_*_conding:utf-8_* ...

  6. DB开发规范---初稿

    1 公共约定 1.1 存储引擎 默认统一使用InnoDB引擎 1.2 字符集设定 后续新建DB默认使用utf8mb4字符集,校对规则使用utf8mb4_general_bin. 历史DB多使用utf8 ...

  7. netstat -an unix socket 会阻塞吗

    [lyd@localhost ~]$ netstat -an | grep "SOFO"unix 2 [ ACC ] SEQPACKET LISTENING 86308 @*MY- ...

  8. 项目Alpha冲刺--8/10

    项目Alpha冲刺--8/10 作业要求 这个作业属于哪个课程 软件工程1916-W(福州大学) 这个作业要求在哪里 项目Alpha冲刺 团队名称 基于云的胜利冲锋队 项目名称 云评:高校学生成绩综合 ...

  9. How Open Source Became The Default Business Model For Software

    https://www.forbes.com/sites/forbestechcouncil/2018/07/16/how-open-source-became-the-default-busines ...

  10. cifar-10数据集的可视化

    import numpy as np from PIL import Image import pickle import os CHANNEL = 3 WIDTH = 32 HEIGHT = 32 ...