Sharing the process of getting started with Python

巴扎黑
Release: 2017-08-02 09:49:50
Original
2021 people have browsed it

The so-called master’s guidance to practice cultivation depends on the individual. Your own diligence is very important, but the premise is that you must have a good teacher to guide you into the right door, and you cannot lead him astray. The same goes for learning Python. Getting started is very important. Below I will share my experience in learning Python.

1. Setting up the development environment

Sharing the process of getting started with Python

##http://www.php.cn/python-tutorials-157440.html

Basic syntax

In [42]: [(x,y) for x in range(3) for y in range(3)]
Out[42]: [(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2)]
In [43]: [[x,y] for x in range(2) for y in range(2)]
Out[43]: [[0, 0], [0, 1], [1, 0], [1, 1]]
Copy after login

http://www.php.cn/python-tutorials-157506.html

Building a web development framework

import web
 
urls = ('/hello', 'hello',
       )
 
class hello(object):
  def GET(self):
    return 'hello world'
 
if __name__ == "__main__":
  app = web.application(urls, globals())
  app.run()
Copy after login

http://www.php.cn/python-tutorials-375814.html

The above is the detailed content of Sharing the process of getting started with Python. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template