0

Help me solve this list code

If I want to output a fruit using indexed number fruits = ["apple", "cherry", "banana", "kiwi", "lemon", "pear", "peach", "avocado"] num = int(input()) if num==0 and num<=7: print (fruits[n:]) else: print("Wrong number")

5th Nov 2020, 5:52 AM
Radu KomlĂłdi
Radu KomlĂłdi - avatar
2 Answers
+ 10
You're looking for something like this? https://code.sololearn.com/chmi9ARWFSNR/?ref=app
5th Nov 2020, 6:06 AM
Simba
Simba - avatar
+ 1
Yes! thank you!
5th Nov 2020, 6:15 AM
Radu KomlĂłdi
Radu KomlĂłdi - avatar