当用户输入它们时,我试图让它打印出来又好又丑,但它只记住用户的最后输入。
n = int(input('How many groups would you like to configure today?'))
for i in range(n):
group = input('Group {}: '.format(i+1))
def uqdfa(money):
return('permit ' + money)
if group == 'nice':
print (uqdfa('233.10.10.10'))
print (uqdfa('233.10.10.11'))
if group == 'ugly':
print (uqdfa('233.10.10.16'))
print (uqdfa('233.10.10.17'))