Write a script that performs the following tasks serially: Create an empty tuple 'tup1' using tuple operation. Print 'tup1'. Create another tuple 'tup2', by passing 'Welcome' string as argument to tuple function. Print 'tup2'. Find and print the count of character 'e' in 'tup2'. Determine the index of character 'e' in 'tup2' and print it. Find the length of tuple 'tup2' and print it.
Answers
Answered by
0
Explanation:
script that performs the following tasks serially: Create an empty tuple 'tup1' using tuple operation. Print 'tup1'. Create another tuple 'tup2', by passing 'Welcome' string as argument to tuple function. Print 'tup2'. Find and print the count of character 'e' in 'tup2'. Determine the index of character 'e' in 'tup2' and print it. ....
Answered by
2
Answer:
tup1 = tuple()
print(tup1)
tup2 = tuple('Welcome')
print(tup2)
print(tup2.count('e'))
print(tup2.index('e'))
print(len(tup2))
Explanation:
Similar questions