मराठी

Consider the following tuple declaration: tup1 = ( 10, 20, 30, (10, 20, 30), 40) Write the output of: print(tupl.index(20)) - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

Consider the following tuple declaration:

tup1 = ( 10, 20, 30, (10, 20, 30), 40)

Write the output of:

print(tupl.index(20))
लघु उत्तर
Advertisements

उत्तर

Output: 1

Explanation:

tupl.index(20) returns the index of the tuple's first occurrence of 20.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2022-2023 (March) Set 4
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×