lists = []
def inputs(m):
for x in range(0,100):
b = input('请输入数字,结束请按.号:')
if b !='.':
lists.append(float(b))
else:
break
pass
pass
def sorts(a):
count = len(lists)
for i in range(0,count):
for j in range(i+1,count):
if lists[i]>lists[j]:
lists[i],lists[j]=lists[j],lists[i]
pass
pass
pass
pass
return lists
print(sorts(inputs(lists)))
加到类里面就提示lists不是默认,求改