News
In python tuple is an immutable objects means it can not be changed, only we can create. alike list tuple are a sequence but the difference is tuple use parentheses "()" where as list uses ...
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window.
Qns 1. Write a python script to store multiple items in a single variable ( Items are “Java”, “Python”, “SQL”, “C” ) using tuple. Ans. Qns 2. Write a python program to store only one item using tuple.
Slices in Python let you return chunks of data from strings, tuples, and lists. This is useful if you ever want to get a few items from a list, or if you want to grab a chunk of a string.
# a python program returning multiple values from a method using tuple # function is defined that returns a tupledef fun(): str = "demo" x = 20 return str, x; # returning a tuple # driver code to test ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results