Skip to content
Pooja Bhatia Classes Hari Nagar
  • We teach following classes
    • Class 12
    • Class 11
    • Class 10
    • Class 9
  • Sumita Arora IP/CS Solutions
  • Jobs/Internship
Pooja Bhatia Classes Hari Nagar

8 BE B

3. The following code has two dictionaries with tuples as keys. While one of these dictionaries being successfully created, the other is giving some error. Find out which dictionary will be created successfully and which one will give error and correct it :

sa 11 cs chapter 13, sa 11 ip chapter 8 / PythonCSIP CS IP

dict1 = { (1, 2) : [1, 2], (3, 4) : [3, 4] } dict2 = { ([1], [2]) : [1, 2], ([3], [4]) : [3, 4]]} dict1 will be created successfully while dict2 will give errors because its keys contain tuples which contain lists inside them. Tuples which are being used as a key […]

3. The following code has two dictionaries with tuples as keys. While one of these dictionaries being successfully created, the other is giving some error. Find out which dictionary will be created successfully and which one will give error and correct it : Read More »

6. What is the output produced by above code :

sa 11 cs chapter 13, sa 11 ip chapter 8 / PythonCSIP CS IP

6. What is the output produced by above code : Read More »

Post pagination
← Previous 1 … 4 5 6 … 9 Next →
  • We teach following classes
    • Class 12
    • Class 11
    • Class 10
    • Class 9
  • Sumita Arora IP/CS Solutions
  • Jobs/Internship
  • We teach following classes
  • Sumita Arora IP/CS Solutions
  • Jobs/Internship

Copyright © 2025 Pooja Bhatia Classes Hari Nagar | Powered by Pooja Bhatia Classes Hari Nagar.