LowKeys = dict(La = 'z', Lb = 'x', Lc = 'c', Ld = 'v', Le = 'b', Lf = 'n', Lg = 'm')
MidKeys = dict(Ma = 'q', Mb = 'w', Mc = 'e', Md = 'r', Me = 't', Mf = 'y', Mg = 'u')
HighKeys = dict(Ha = 'i', Hb = 'o', Hc = 'p', Hd = '[', He = ']')
SharpLowKeys = dict(SLa = 's', SLc = 'f', SLd = 'g', SLf = 'j', SLg = 'k')
FlatLowKeys = dict(FLa = 'a', FLb = 's', FLd = 'f', FLe = 'g', FLg = 'j')
SharpMidKeys = dict(SMa = '2', SMc = '4', SMd = '5', SMf = '7', SMg = '8')
FlatMidKeys = dict(FMa = '1', FMb = '2', FMd = '4', FMe = '5', FMg = '7')
SharpHighKeys = dict(SHa = '9', SHc = '-', SHd = '=')
FlatHighKeys = dict(FHa = '8', FHb = '9', FHd = '-', FHe = '=')
notes = raw_input('Notes: ')
notes = notes.split()
我想用值替换出现在两个注释和任何一个中的所有dicts
项目dict
。
前任:
notes = La, Ha, Lb
notes = z, i, x
有没有办法做到这一点?还是比我正在尝试的更好的方法?