The data types such as number, string, list, tuple, and dictionary are variable data objects through parameter passing.

Source: Internet
Author: User

#!/usr/bin/python#coding=utf-8__author__ =  ' Moxiaokai ' #通过参数传递 to determine if a data type such as a number, string, list, tuple, or dictionary is a variable data object a  = 2b =  ' aha ' c = [1, 2, 3]d =  (1, 2, 3) e =  {' Tom ': 11,  ' Sam ': 57,  ' Lily ':  100}def num (x):         #数字     x = 100    print xnum (a) print  ADEF STR (x):         #字符串     x =   ' Ade '     print xstr (b) print bdef list (x):          #list     x[0] = 100    print  Xlist (c) print cdef tuple (x):        #tuple      X[0] = 100    print x    tuple (d)      raise stopiteration () pRint ddef dic (x):          #词典     x[ ' Tom '] = 100    print xdic (e) print e

This article is from the "Little Mo Growth Road" blog, please be sure to keep this source http://309173854.blog.51cto.com/7370240/1869506

The data types such as number, string, list, tuple, and dictionary are variable data objects through parameter passing.

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.