擅长:python、mysql、java
<pre><code>n=int(input("Enter the number of User:\n"))
output=[]
for i in range(0,n):
print("Enter the details of User %d"%(i+1))
name=input("Enter the name of the user:\n")
mno=int(input("Enter the mobile number of the user:\n"))
uname=input("Enter the username of the user:\n")
pswd=input("Enter the password of the user:\n")
output.append({
"name":name,
"mno":mno,
"uname":uname,
"pswd":pswd
})
print(output)
</code></pre>
<h2>输出</h2>
<pre><code>Enter the number of User:
1
Enter the details of User 1
Enter the name of the user:
reza
Enter the mobile number of the user:
1212
Enter the username of the user:
rb
Enter the password of the user:
23232
</code></pre>
<h2>[{'name':'reza','mno':1212,'uname':'rb','pswd':'23232'}]</h2>