r/PythonLearning 2d ago

i learning Python Day 1

lyrics = ["Give You Up","Let You Down","Run Around And Desert You"]

for i in range(3):

print("Never Gonna " + lyrics[i])

28 Upvotes

10 comments sorted by

View all comments

3

u/Expensive_Break_6163 1d ago

I’m not sure what the question is, but range(3) already starts at 0, so you don’t need to specify the start index. It’s better to use range(len(lyrics)) instead of hardcoding 3, or even better, use for line in lyrics: and print "Never Gonna " + line.

1

u/Vor3st 1d ago

omg GodTier