# Python——输入与输出，Python的起步！

> 来源：梦飞idc云平台 | 原文：https://www.mfisp.com/14519.html | 发布：2022-12-16 | 更新：2022-12-16 | 分类：建站教程、投稿分享

## **输入与输出**

 

> name = input("请输入您的名字：")
> 
>  
> 
> password = int(input("请输入您的密码："))
> 
>  
> 
> print(f"您的名字是{name}，您的密码是{password}，您的名字长度是{len(name)}")
> 
>  
> 
> print(f"变量类型是{type(name)}")
> 
>  
> 
> # print(type(int(age)))

  

> print(1,2,3,4,sep="&&&&",end="**")
> 
>  
> 
> a = "xixi"
> 
>  
> 
> b = "haha"
> 
>  
> 
> print(a,sep="~~",end="%%")
> 
>  
> 
> print(b)
> 
>  
> 
> #file 可以指定输出方式
> 
>  
> 
> f = open("test,txt","w+")
> 
>  
> 
> print("hello world!",file=f)

  

> username = input("请输入您的名字：")
> 
>  
> 
> password = input("请输入您的密码：")
> 
>  
> 
> print(username,password)
> 
>   
> 
> num = input("请输入您想要的数字：")
> 
>  
> 
> print(int(num)/10)

---
本页由 梦飞idc云平台（https://www.mfisp.com）提供。站点导航见 https://www.mfisp.com/llms.txt
