Let's say a friend of yours has a tuple containing all fruits they have tasted ranged from the most to the least favorite ones. You can't see the tuple itself but want to know at which position "pineapple" is placed because you would like to buy a few for your party. How can you get the position of this string in the tuple fruit? Write the line of code below.
Operations with tuple
The fruit
Report a typo
Write a program in Python 3
# the tuple "fruit" is already defined
position = ...
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.