dic={} dic1={} x=int(input("howmany inputs you want:")) for i in range(x): tname=input("enter team name:") win=int(input("enter howmany match win:")) loss=int(input("enter howmany match loss:")) dic1.update({'win':win,'loss':loss}) dic.update({tname:dic1}) print(dic)