python入门

发布时间 2023-06-07 10:03:18作者: 哎呦哎(iui)

一.输入函数input()

这个就是直接使用input()就行不需要导入其他的库函数
例如:
image

二.分割函数split("")

这个也不需要导入什么库
例如这个:

点击查看代码
str1=input()
 
#使用split()将字符串生成列表
list1=str1.split(" ")
其返回分割后的字符串的列表。 ![image](https://img2023.cnblogs.com/blog/1914163/202306/1914163-20230607095924759-1328002380.png)