Python-modules,

Source: Internet
Author: User

Python-modules,

Use of the python Module

1 #! /Usr/bin/env pyton3.5.4 2 #-*-conding = "UTF-8"-*-3 4 # Use sys module 5 from sys import * 6 7 8 for I in argv: 9 print (I) 10 11 print ('\ n \ nthe PythonPath is', path, '\ n') 12 13 14 # module _ name __: each module has a name. When the name is main, you can run it separately: 15 # If we only want to run the main block when the program itself is used, when it is input by another module, it does not run the main block-you can use the _ name _ attribute of the module to complete 16 '''17 _ name _ = '_ kobe _ _ '18 19 if _ name _ = '_ main __': 20 print ('itself ') 21 else: 22 print ('kobe ') 23 ''' 24 25 # _ doc _ use 26''' 27 def print_max (x, y): 28' 29 The maximum of two numbers, 30 31 the larger one.32 '33 x = int (x) 34 y = int (y) 35 if x> y: 36 print ('max is: ', x) 37 else: 38 print ('max is: ', y) 39 40 41 print_max (3, 6) 42 help (print_max) 43 print (print_max. _ doc _) 44 '''

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.