zoukankan      html  css  js  c++  java
  • python是条狗

    Python简介

      python是吉多·范罗苏姆发明的一种面向对象的脚本语言,可能有些人不知道面向对象和脚本具体是什么意思,但是对于一个初学者来说,现在并不需要明白。大家都知道,当下全栈工程师的概念很火,而Python是一种全栈的开发语言,所以你如果能学好Python,那么前端,后端,测试,大数据分析,爬虫等这些工作你都能胜任。

    为什么选择Python

      关于语言的选择,有各种各样的讨论,在这里我不多说,就引用Python里面的一个彩蛋来说明为什么要选择Python,在Python解释器里输入import this 就可以看到。

     1 >>> import this
     2 
     3  
     4 
     5 The Zen of Python by Tim Peters
     6 
     7  
     8 
     9 Beautiful is better than ugly.
    10 
    11 Explicit is better than implicit.
    12 
    13 Simple is better than complex.
    14 
    15 Complex is better than complicated.
    16 
    17 Flat is better than nested.
    18 
    19 Sparse is better than dense.
    20 
    21 Readability counts.
    22 
    23 Special cases aren't special enough to break the rules.
    24 
    25 Although practicality beats purity.
    26 
    27 Errors should never pass silently.
    28 
    29 Unless explicitly silenced.
    30 
    31 In the face of ambiguity, refuse the temptation to guess.
    32 
    33 There should be one-- and preferably only one --obvious way to do it.
    34 
    35 Although that way may not be obvious at first unless you're Dutch.
    36 
    37 Now is better than never.
    38 
    39 Although never is often better than *right* now.
    40 
    41 If the implementation is hard to explain, it's a bad idea.
    42 
    43 If the implementation is easy to explain, it may be a good idea.
    44 
    45 Namespaces are one honking great idea -- let's do more of those! 

    上面的话简单的总结来说就是“优雅”、“明确”、“简单”,或许你还是有些不明白,举个简单的例子,若果同样的功能你用C/C++写可能要写100行代码,而如果用Python写你可能只要20行代码就搞定,同样的如果一个问题有好几种解决方案,但是Python会用一种最简单的方法来实现。所以Python是用最简单最优雅最明确的方法来解决问题。

    月儿弯弯照九州,几家欢乐几家愁。 对于中年以后的人,十年八年不过是指缝间的事,而对于年轻人,三年五年就可以是一生一世。
  • 相关阅读:
    Elasticsearch(ES) 创建索引
    Elasticsearch(ES) 下载&安装
    一文带您了解 Elasticsearch 中,如何进行索引管理(图文教程)
    Spring Boot 2.0 快速集成整合消息中间件 Kafka
    一文教您如何通过 Docker 搭建反向代理 Ngnix,并配置 Https SSL 证书
    Django开发文档-域用户集成登录
    Python实现按键精灵(二)-找图找色
    Python学习笔记-SQLSERVER的大批量导入以及日常操作(比executemany快3倍)
    Python爬虫案例-获取最新的中国行政区域划分
    PostgreSQL自动更新序列sequence
  • 原文地址:https://www.cnblogs.com/ms520/p/9916629.html
Copyright © 2011-2022 走看看