用python寫一個代碼?
mapper=dict(zip(('Tom','Joes','Ki','Tim'),('Teenage','Mutant','Ninja','Turtles'))
)defgetName():whileTrue:name=raw_input("Enteraname:"
)ifnameinmapper:returnnameprint"got:%s"%mapper.get(getName())
用python寫一個代碼?
mapper=dict(zip(('Tom','Joes','Ki','Tim'),('Teenage','Mutant','Ninja','Turtles'))
)defgetName():whileTrue:name=raw_input("Enteraname:"
)ifnameinmapper:returnnameprint"got:%s"%mapper.get(getName())