data = ['數學=80','英文=90','自然=70']result = dict([d.split("=") for d in data])print(result)
Standard input is empty
{'數學': '80', '英文': '90', '自然': '70'}
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!