2. Ask users to enter their name and gender first. Then print it to the screen for user /confirm/iation. After that, append the name and gender to file user_info.txt as a new line.
list [] name input( 请输入你的姓名 ) sex input( 请输入你的性别 ) list.append(name) list.append(sex) with open( info.txt , a ) as output: line name : sex n output.write(line)
代码段稍有简陋 得闲改进
2021.09.27



