str1=input("输入字符串")
boole1=input('输入逻辑值')
complex1=input('输入复数')
float1=input('输入实数')
int1=input('输入整数')
with open('Exp030201.txt','a') as f:
f.write(str1+'\n')
f.write(boole1+'\n')
f.write(complex1+'\n')
f.write(float1+'\n')
f.write(int1+'\n')
f.close()
![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/8326cffc1e178a82987e9bdce603738da977e808?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
效果图
我看题目没有说要类型转换的就没有转换,有问题继续追问