song = """Yeah yeah yeah yeah yeah yeah
Yeah yeah yeah yeah yeah yeah
I think I did it again
I made you believe we're more than just friends
Oh baby
It might seem like a crush
But it doesn't mean that I'm serious
'Cause to lose all my senses
That is just so typically me
Oh baby, baby""".splitlines()
song = ['Yeah yeah yeah yeah yeah yeah',
'Yeah yeah yeah yeah yeah yeah',
'I think I did it again',
"I made you believe we're more than just friends",
'Oh baby',
'It might seem like a crush',
"But it doesn't mean that I'm serious",
"'Cause to lose all my senses",
'That is just so typically me',
'Oh baby, baby']
song
song_with_line_numbers = list(enumerate(song, 1))
song_with_line_numbers
i, item = (1, 'Yeah yeah yeah yeah yeah yeah')
i
item
for i, item in enumerate(song):
print(i, ':', item)
words = "the quick brown fox jumped over the lazy dog".split()
for i, word in enumerate(words):
words[i] = word.capitalize()
words
fruits = [
'apple',
'mango',
'pear',
'grapes'
]
prices = [
14,
7,
8,
25
]
list(zip(fruits, prices))
for fruit, price in zip(fruits, prices):
print(fruit, price)
dict (fruits, prices)
dict(zip(fruits, prices))