python学习5 函数

#!/usr/bin/python
# -*- coding: UTF-8 -*-
 
import calendar
 
cal = calendar.month(2016, 1)
print ("以下输出2016年1月份的日历:")
print (cal)

def printme(str):
   "打印传入的字符串到标准显示设备上"
   print (str)
   return

# 定义函数
def printme(str):
   "打印任何传入的字符串"
   print (str)
   return
 
# 调用函数
printme("我要调用用户自定义函数!")
printme("再次调用同一函数")

def ch(a):
	a.append([1,2,3,4])
	print(a)
	return
bb=[10,11,12]
print (ch(bb))

  

posted @ 2024-03-27 16:40  飞雪飘鸿  阅读(1)  评论(0编辑  收藏  举报
https://damo.alibaba.com/ https://tianchi.aliyun.com/course?spm=5176.21206777.J_3941670930.5.87dc17c9BZNvLL