help4code-logo
  • eLearning
    • Tutorials
    • Programs
    • Interview Questions
    • Technical Questions
    • C Language
    • C++
    • JAVA
    • HTML & CSS
    • PHP
    • AJAX
    • J2EE
    • SQL
    • jQuery
  • Go back to Home
  • Our Placements
  • Tutorials
  • Programs
  • Interview Questions
  • Technical Questions
  • Live Training
  • Our Placements
  • Associated Colleges
  • Our Recruiters
  • Back
  • C Language
  • C++
  • JAVA
  • HTML & CSS
  • PHP
  • AJAX
  • J2EE
  • SQL
  • jQuery

Programs

  1. Home
  2. Programs
  3. Python
  4. Dictionary
Image

Programs - Python - Dictionary

  • Programs
    • WAP to access value from dictionary
    • WAP for update and delete from dictionary
    • WAP to show use of items() method
    • WAP to check if a given key already exists in a dictionary
    • WAP for different operations on dictionary
    • WAP to show use of pop() and clear() in dictionary
    • WAP to show use of formkeys() and keys() in dictionary
    • WAP for dictionary comprehension
    • WAP for dictionary membership test
    • WAP to iterate dictionary
    • WAP for dictionary built-in function

Program:

# Dictionary Methods
marks = {}.fromkeys(['Math', 'English', 'Science'], 0)

print(marks)

print(list(marks.keys()))

Output:

{Math: 0, English: 0, Science: 0}
[Math, English, Science]
Help4Code

The help4code.com - An e-learning educational website where all computer science students can find rich collection of computer language programs which will help in exploring computer programming.

  • About
  • Associated Colleges
  • Leadership
  • Careers
  • Our Recruiters
  • Community
  • Terms
  • Privacy
  • Help
  • Press
  • Contact
  • Directory

First Floor, Plot No. 4, Near Shat Ayu College, Ring Road Nagpur, Maharashtra, India - 440022
+91 9175287066[email protected]

© Copyright 2022 help4code.com.

  • My Account
  • Sign-in
  • Sign-up