python 的入门

发布时间:2019-05-13 21:56:35编辑:auto阅读(1908)

             时光匆匆,大一的时间过的很快,从大一上学期学的c开始,就感觉出c的结构很复杂,但是不可否认,学习c和汇编等涉及到系统底层知识才会有可能开发出属于自己知识产权的东西,然而,python以其简约性,丰富的库,流畅的语法结构等特点成为了18年最火的语言,当然这其中或多或少也有培训机构吹捧的功劳,于是决定入坑python,其中有大佬总结出一句话 “人生苦短,我用python!”好了,直接进入主题吧。

    1,hello world 的编写

    hello world是认识一个新语言的好办法,代码如下基于(python3.x):

    print ("hello,world!")

    print ("输入任意字符")

      结果:

      hello,world!

      输入任意字符

    完全不需要引入什么库就能直接打印出结果,确实很简约。

     

    print_r('helloworld!');
    var_dump('helloworld!');
    NSLog(@"helloworld!");
    System.out.println("helloworld!");
    console.log("helloworld!");
    print("helloworld!");
    printf("helloworld!");
    cout << "helloworld!" << endl;
    Console.WriteLine("helloworld!");
    fmt.Println("helloworld!");
    Response.Write("helloworld");
    alert("helloworld!")
    echo "helloworld!"
    各式的hello world

     

     

     

关键字