我们小区艺体能神话,213小游戏,宋久林
after a short period of new year days, i found life a little boring. so just do something funny--python. before we begin, what we should know first is that python is a dynamic language, which means the type of data of every varieable
as the version i download is python, which i found something wrong with the studying video, i look through some websites.the first point need paying attention to is the change of function 'print', which can be used as output sentense in p2 while can be used as a function in p3.
if we met " unicodedecodeerror" when coding, add a note line at the first line.
1 # -*- coding: utf-8 -*-
list:
1 h=['drunk',1] 2 o=['youth',0] 3 g=[]
tuple:
1 1 h=('drunk',1) 2 2 o=('youth',0) 3 3 g=(('drunk',0),['youth',1])
the greatest difference between them is the whether can be changed. tuple is determined as long as it is defined, while list can be changed by append(), insert(), pop(). but there is a exception that the list in tuple can alse be changed.
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Python 实现将numpy中的nan和inf,nan替换成对应的均值
python爬虫把url链接编码成gbk2312格式过程解析
网友评论