Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for data in result:
- dic = { "student_names" : str(data[1]),
- "student_department" : str(data[7])}
- print dic
- {'student_names': 'Shahroz Akbar', 'student_department': 'computer science'}
- {'student_names': 'Ahsan Mehmood', 'student_department': 'computer science'}
- {'student_names': 'Hamza Anwar', 'student_department': 'computer science'}
- list1 = [{'student_names': 'Shahroz Akbar', 'student_department': 'computer science'},
- {'student_names': 'Ahsan Mehmood', 'student_department': 'computer science '},
- 'student_names': 'Hamza Anwar', 'student_department': 'computer science'}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement