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

12 BE B

7. Find the error. Following code intends to create a tuple with three identical strings. But even after successfully executing following code (No error reported by Python), The len() returns a value different from 3. Why ?

sa 11 cs chapter 12 / PythonCSIP CS IP

tup1 = (‘Mega’) * 3 print(len(tup1)) This is because tup1 is not a tuple but a string. To make tup1 a tuple it should be initialised as following: tup1 = (‘Mega’,)*3 # notice the “,” after ‘Mega’

7. Find the error. Following code intends to create a tuple with three identical strings. But even after successfully executing following code (No error reported by Python), The len() returns a value different from 3. Why ? Read More »

8. Predict the output

sa 11 cs chapter 12 / PythonCSIP CS IP

8. Predict the output Read More »

Post pagination
1 2 … 6 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.