import Image from get_png import getpng def transparent(infile): #open png,covert it into 'RGBA mode',resize it,get data then make a datalist datalist=list(Image.open(infile,'r').convert('RGBA').resize((1000,1000),Image.BILINEAR).getdata()) #color(0,
#英文字串首字母改为大写 st = "string" St = st[0].upper() + st[1:] 2016-10-22 后来了解到 python 内部有相关实现,感觉 python 好贴心~~~ >>> "hehe he hehe".capitalize() 'Hehe he hehe' >>> "hehe he hehe".title() 'Hehe He Hehe'