Skip to content

Green1ee/PythonLearnPlaning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

你好

即将开始

Shoping.py 商品购买以及商品管理

用到了初学的两种字符串拼接技巧:

"I`m %s"%name

"{name}".format(name = "GreenLee")

以及异常处理:

try:
    pass
except:
    pass

文件操作,用with以防忘记关闭,类似.net中的using(){}: 使用open操作文件的时候,注意mode中如果带**+**,则文件内容 会被清空,需要特别注意

with open(filepath, mode, encode) as var:
    fileContent = var.read()

数组的操作:

arr = []	
arr.append("GreenLee")
arr.pop(0)

由于还没有学习函数,因此过程实现不够清爽

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages