In [14]:
t1=("ramesh","suresh","naresh")
In [15]:
t1
Out[15]:
In [16]:
type(t1)
Out[16]:
In [17]:
len(t1)
Out[17]:
In [18]:
t1[0]
Out[18]:
In [19]:
t1[1]="vlr"
In [20]:
t1=(1,2,3,4,5,6,7,8)
In [21]:
t1
Out[21]:
In [22]:
t1[1:3]
Out[22]:
In [24]:
t1[1:9:4]
Out[24]:
In [26]:
t1[::-1]
Out[26]:
for getting 5 to 1 in reverse order
ReplyDeletet1[-4::-1]
sir,Good day,I have typed t1=('ramesh','suresh','naresh') and I typed for type(t1) but Iam getting t1 as string but not as tuple
ReplyDelete